     expect(minimap.getHeight()).toEqual(editor.getScreenLineCount() * 5)
 
   it 'measures the scaling factor between the editor and the minimap', ->
-    expect(minimap.getVerticalScaleFactor()).toEqual(0.5)
-    expect(minimap.getHorizontalScaleFactor()).toEqual(2 / editor.getDefaultCharWidth())
+    expect(minimap.getVerticalScaleFactor()).toEqual(minimapVerticalScaleFactor)
+    expect(minimap.getHorizontalScaleFactor()).toEqual(minimapHorizontalScaleFactor)
 
   it 'measures the editor visible area size at minimap scale', ->
     editor.setText(largeSample)
-    expect(minimap.getTextEditorScaledHeight()).toEqual(25)
+    expect(minimap.getTextEditorScaledHeight()).toEqual(50 * minimapVerticalScaleFactor)
 
   it 'measures the available minimap scroll', ->
     editor.setText(largeSample)

Minimap = require '../lib/minimap'

describe 'Minimap', ->
  [editor, editorElement, minimap, largeSample, smallSample] = []

  beforeEach ->
    atom.config.set 'minimap.charHeight', 4

    jasmine.attachToDOM(editorElement)
    editorElement.setHeight(50)
    editorElement.setWidth(200)

    minimapVerticalScaleFactor = 5 / editor.getLineHeightInPixels()
    minimapHorizontalScaleFactor = 2 / editor.getDefaultCharWidth()

    dir = atom.project.getDirectories()[0]

