mirror of
https://github.com/wassname/nvatom.git
synced 2026-08-20 12:30:42 +08:00
Initialize a package using Atom's package generator
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user