Initialize a package using Atom's package generator

This commit is contained in:
Seong Jae Lee
2014-11-08 10:20:46 -08:00
commit d38f11be66
12 changed files with 179 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
{WorkspaceView} = require 'atom'
NotationalVelocity = require '../lib/notational-velocity'
# Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.
#
# To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit`
# or `fdescribe`). Remove the `f` to unfocus the block.
describe "NotationalVelocity", ->
activationPromise = null
beforeEach ->
atom.workspaceView = new WorkspaceView
activationPromise = atom.packages.activatePackage('notational-velocity')
describe "when the notational-velocity:toggle event is triggered", ->
it "attaches and then detaches the view", ->
expect(atom.workspaceView.find('.notational-velocity')).not.toExist()
# This is an activation event, triggering it will cause the package to be
# activated.
atom.commands.dispatch atom.workspaceView.element, 'notational-velocity:toggle'
waitsForPromise ->
activationPromise
runs ->
expect(atom.workspaceView.find('.notational-velocity')).toExist()
atom.commands.dispatch atom.workspaceView.element, 'notational-velocity:toggle'
expect(atom.workspaceView.find('.notational-velocity')).not.toExist()
@@ -0,0 +1,5 @@
NotationalVelocityView = require '../lib/notational-velocity-view'
describe "NotationalVelocityView", ->
it "has one valid test", ->
expect("life").toBe "easy"