         it "does not fold when the line number componentNode is clicked", ->
           lineNumber = component.lineNumberNodeForScreenRow(1)
           lineNumber.dispatchEvent(buildClickEvent(lineNumber))
-          runSetImmediateCallbacks()
+          expect(hasSetImmediateCallbacks()).toBe false
           expect(lineNumberHasClass(1, 'folded')).toBe false
 
   describe "cursor rendering", ->

    it "does not handle input events when input is disabled", ->
      component.setInputEnabled(false)
      componentNode.dispatchEvent(buildTextInputEvent(data: 'x', target: inputNode))
      runSetImmediateCallbacks()
      expect(editor.lineForBufferRow(0)).toBe 'var quicksort = function () {'

    describe "when IME composition is used to insert international characters", ->

        wrapperView.hide()

        component.setFontSize(22)

        wrapperView.show()
        editor.setCursorBufferPosition([0, Infinity])
