2015-04-29 01:50:09 -06:00
|
|
|
Beautify = require '../src/beautify'
|
2014-03-04 00:07:45 -07:00
|
|
|
|
|
|
|
# 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 "AtomBeautify", ->
|
|
|
|
activationPromise = null
|
|
|
|
|
|
|
|
beforeEach ->
|
|
|
|
atom.workspaceView = new WorkspaceView
|
|
|
|
activationPromise = atom.packages.activatePackage('atomBeautify')
|
|
|
|
|
|
|
|
# describe "when the beautify event is triggered", ->
|
|
|
|
# it "attaches and then detaches the view", ->
|
|
|
|
# expect(atom.workspaceView.find('.atom-beautify')).not.toExist()
|
|
|
|
#
|
|
|
|
# # This is an activation event, triggering it will cause the package to be
|
|
|
|
# # activated.
|
|
|
|
# atom.workspaceView.trigger 'beautify'
|
|
|
|
#
|
|
|
|
# waitsForPromise ->
|
|
|
|
# activationPromise
|
|
|
|
#
|
|
|
|
# runs ->
|
|
|
|
# expect(atom.workspaceView.find('.atom-beautify')).toExist()
|
|
|
|
# atom.workspaceView.trigger 'beautify'
|
|
|
|
# expect(atom.workspaceView.find('.atom-beautify')).not.toExist()
|