         autocompleteManager = mainModule.autocompleteManager
 
       runs ->
+        advanceClock 1
         editorView = atom.views.getView(editor)
 
-    it 'adds words to the wordlist after they have been written', ->
+    it "runs a completion ", ->
+      provider = autocompleteManager.providerManager.fuzzyProvider
+      expect(indexOfWord(provider.wordList, 'quicksort')).not.toEqual(-1)
+
+    it "adds words to the wordlist after they have been written", ->
       provider = autocompleteManager.providerManager.fuzzyProvider
 
       expect(provider.wordList.indexOf('somethingNew')).toEqual(-1)

        editor = e

      # Activate the package
      waitsForPromise -> atom.packages.activatePackage('autocomplete-plus').then (a) ->
        mainModule = a.mainModule

      waitsFor ->
        mainModule.autocompleteManager?.ready

{triggerAutocompletion, buildIMECompositionEvent, buildTextInputEvent} = require('./spec-helper')
_ = require('underscore-plus')
TestProvider = require('./lib/test-provider')

indexOfWord = (suggestionList, word) ->
  for suggestion, i in suggestionList
    return i if suggestion.word is word
  -1

describe 'Autocomplete', ->
  [completionDelay, editorView, editor, mainModule, autocompleteManager] = []
