       atom.config.set('spell-check.grammars', ['source.js'])
 
       waitsFor ->
-        getMisspellingMarkers().length > 0
-
-      runs ->
-        expect(getMisspellingMarkers().length).toBe 2
-        editor.destroy()
-        expect(getMisspellingMarkers().length).toBe 0
+        getMisspellingMarkers().length is 2
+
+      runs ->
+        editor.destroy()
+        expect(getMisspellingMarkers().length).toBe 0

    advanceClock(editor.getBuffer().getStoppedChangingDelay())
    atom.config.set('spell-check.grammars', ['source.js'])

    misspellingMarkers = null
    waitsFor ->
      misspellingMarkers = getMisspellingMarkers()
      misspellingMarkers.length > 0

    runs ->
      expect(misspellingMarkers.length).toBe 1
      editor.moveToEndOfLine()
      editor.insertText('a')
      advanceClock(editor.getBuffer().getStoppedChangingDelay())

      atom.config.set('spell-check.grammars', ['source.js'])

      waitsFor ->
        getMisspellingMarkers().length is 1

      runs ->
        editor.destroy()
        expect(getMisspellingMarkers().length).toBe 0

