     jasmine.attachToDOM(editorElement)
     editorElement.setHeight(50)
     editorElement.setWidth(200)
-    editor.setLineHeightInPixels(10)
+
+    minimapVerticalScaleFactor = 5 / editor.getLineHeightInPixels()
+    minimapHorizontalScaleFactor = 2 / editor.getDefaultCharWidth()
 
     dir = atom.project.getDirectories()[0]
 

Minimap = require '../lib/minimap'

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

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

      editorScrollRatio = editorElement.getScrollTop() / (editorElement.getScrollHeight() - editorElement.getHeight())

    it 'scales the editor scroll based on the minimap scale factor', ->
      expect(minimap.getTextEditorScaledScrollTop()).toEqual(1000 * minimapVerticalScaleFactor)
      expect(minimap.getTextEditorScaledScrollLeft()).toEqual(200 * minimapHorizontalScaleFactor)

    it 'computes the offset to apply based on the editor scroll top', ->
      expect(minimap.getScrollTop()).toEqual(editorScrollRatio * minimap.getMaxScrollTop())
