     it "accounts for character widths when positioning cursors", ->
       atom.config.set('editor.fontFamily', 'sans-serif')
       editor.setCursorScreenPosition([0, 16])
-      nextTick()
+      runSetImmediateCallbacks()
 
       cursor = node.querySelector('.cursor')
       cursorRect = cursor.getBoundingClientRect()


      it "removes the classes and unsubscribes from the marker when decoration is removed", ->
        editor.removeDecorationForMarker(marker, decoration)
        nextTick()

        expect(lineHasClass(1, 'someclass')).toBe false
        expect(lineHasClass(2, 'someclass')).toBe false

      expect(cursorNodes[1].style['-webkit-transform']).toBe "translate3d(#{(10 - 3.5) * charWidth}px, #{(4 - 4.5) * lineHeightInPixels}px, 0px)"

      cursor3.destroy()
      runSetImmediateCallbacks()
      cursorNodes = node.querySelectorAll('.cursor')
      expect(cursorNodes.length).toBe 1
      expect(cursorNodes[0].style['-webkit-transform']).toBe "translate3d(#{(11 - 3.5) * charWidth}px, #{(6 - 2.5) * lineHeightInPixels}px, 0px)"
