<commit_before>'use babel'

import './helpers/workspace'
import Minimap from '../lib/minimap'

describe('Minimap package', () => {
  let [editor, minimap, editorElement, minimapElement, workspaceElement, minimapPackage] = []

  beforeEach(() => {
    atom.config.set('minimap.autoToggle', true)

    workspaceElement = atom.views.getView(atom.workspace)
    jasmine.attachToDOM(workspaceElement)

    waitsForPromise(() => {
      return atom.workspace.open('sample.coffee')
    })

    waitsForPromise(() => {
      return atom.packages.activatePackage('minimap').then((pkg) => {
        minimapPackage = pkg.mainModule
      })
    })

    waitsFor(() => {
      return workspaceElement.querySelector('atom-text-editor')
    })

    runs(() => {
      editor = atom.workspace.getActiveTextEditor()
      editorElement = atom.views.getView(editor)
    })

    waitsFor(() => {
      return workspaceElement.querySelector('atom-text-editor::shadow atom-text-editor-minimap')
    })
  })<commit_msg>:green_heart: Fix minimap main specs<commit_after>'use babel'

import './helpers/workspace'
import Minimap from '../lib/minimap'
import MinimapElement from '../lib/minimap-element'

describe('Minimap package', () => {
  let [editor, minimap, editorElement, minimapElement, workspaceElement, minimapPackage] = []

  beforeEach(() => {
    atom.config.set('minimap.autoToggle', true)

    workspaceElement = atom.views.getView(atom.workspace)
    jasmine.attachToDOM(workspaceElement)

    MinimapElement.registerViewProvider(Minimap)

    waitsForPromise(() => {
      return atom.workspace.open('sample.coffee')
    })

    waitsForPromise(() => {
      return atom.packages.activatePackage('minimap').then((pkg) => {
        minimapPackage = pkg.mainModule
      })
    })

    waitsFor(() => {
      return workspaceElement.querySelector('atom-text-editor')
    })

    runs(() => {
      editor = atom.workspace.getActiveTextEditor()
      editorElement = atom.views.getView(editor)
    })

    waitsFor(() => {
      return workspaceElement.querySelector('atom-text-editor::shadow atom-text-editor-minimap')
    })
  })
{'fraction_non_alphanumeric': 0.14992927864214992, 'fraction_numerical': 0.0, 'mean_word_length': 3.54389721627409, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2818967', 'n_tokens_mistral': 660, 'n_tokens_neox': 647, 'n_words': 95}