           sleep(150)
           runs ->
             nextAnimationFrame()
-            expect(minimapElement.canvas.width).toEqual(4)
+            expect(minimapElement.canvas.width / devicePixelRatio).toEqual(4)
 
       describe 'when the editor is resized', ->
         beforeEach ->

        nextAnimationFrame()

      it 'adjusts the width of the minimap canvas', ->
        expect(minimapElement.canvas.width).toEqual(4)

      it 'offsets the minimap by the difference', ->
        expect(realOffsetLeft(minimapElement)).toBeCloseTo(editorElement.clientWidth - 4, -1)

      expect(minimapElement.offsetWidth).toBeCloseTo(editorElement.clientWidth / 11, 0)

    it 'resizes the canvas to fit the minimap', ->
      expect(canvas.offsetHeight / devicePixelRatio).toEqual(minimapElement.offsetHeight + minimap.getLineHeight())
      expect(canvas.offsetWidth / devicePixelRatio).toEqual(minimapElement.offsetWidth)

    it 'requests an update', ->
      expect(minimapElement.frameRequested).toBeTruthy()
