Don’t test for editor-created events when editor is copied

We can handle this through ::onDidAddTextEditor when the copy is added
back to the pane.
This commit is contained in:
Nathan Sobo 2014-09-03 19:25:40 -06:00
parent f87f7c358a
commit 83327eeabb

View File

@ -311,20 +311,6 @@ describe "Workspace", ->
editor.destroy()
expect(workspace.getEditors()).toHaveLength 0
describe "when an editor is copied", ->
it "emits an 'editor-created' event", ->
editor = null
handler = jasmine.createSpy('editorCreatedHandler')
workspace.on 'editor-created', handler
waitsForPromise ->
workspace.open("a").then (o) -> editor = o
runs ->
expect(handler.callCount).toBe 1
editorCopy = editor.copy()
expect(handler.callCount).toBe 2
it "stores the active grammars used by all the open editors", ->
waitsForPromise ->
atom.packages.activatePackage('language-javascript')