Skip to content

Instantly share code, notes, and snippets.

@aaronjensen
Created July 18, 2015 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronjensen/0314d546308fa014b876 to your computer and use it in GitHub Desktop.
Save aaronjensen/0314d546308fa014b876 to your computer and use it in GitHub Desktop.
EditorState = require './editor-state'
describe "", ->
[editor, editorView] = []
beforeEach ->
waitsForPromise -> atom.workspace.open()
runs ->
editor = atom.workspace.getActiveTextEditor()
editorView = atom.views.getView(editor)
it "", ->
expect(atom.packages.isPackageActive("find-and-till")).toBe false
EditorState.set(editor, "tes[0]ting 1234")
console.log(EditorState.get(editor))
activationPromise = atom.packages.activatePackage("find-and-till")
out = atom.commands.dispatch editorView, "find-and-till:select-find"
console.log "dispatched #{out}"
waitsForPromise -> activationPromise
runs ->
temporaryEditor = atom.workspace.getActiveTextEditor()
console.log(temporaryEditor)
expect(EditorState.get(temporaryEditor)).toBe false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment