         ensureDecorations(editor3, "underline-01": ['orange', 'orange', 'orange'])
 
   describe "selection changed when highlightSelection", ->
+    beforeEach ->
+      spyOn(_._, "now").andCallFake -> window.now
+
     it "decorate selected keyword", ->
       dispatchCommand('editor:select-word')
       advanceClock(150)

      beforeEach ->
        setConfig('highlightSelectionDelay', 300)

      xit "highlight selection after specified delay", ->
        # FIXME: It delay works in interactive use, but I can't make it success in this spec.
        # need investigation.
        dispatchCommand('editor:select-word')
        expect(editor.getSelectedText()).toBe "orange"
        expect(getDecorations(editor)).toHaveLength 0
        advanceClock(150)
        expect(getDecorations(editor)).toHaveLength 0
        advanceClock(150)
        ensureDecorations(editor, "box-selection": ['orange', 'orange', 'orange'])

    describe "displayCountOnStatusBar", ->
      [editor3, container, span] = []
      beforeEach ->
        editor.setText """
        apple orange
        orange lemon orange
        apple
        """
        waitsForPromise ->
          atom.packages.activatePackage("status-bar")

        waitsFor ->
          main.statusBarManager.tile?

        runs ->
          container = workspaceElement.querySelector('#status-bar-quick-highlight')

    atom.commands.dispatch(element, command)

  beforeEach ->
    workspaceElement = atom.views.getView(atom.workspace)
    jasmine.attachToDOM(workspaceElement)

