Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
path = require 'path'
fs = require 'fs-plus'
temp = require 'temp'
describe 'Jekyll', ->
describe 'before Activation', ->
it 'should be in the packages list', ->
expect(atom.packages.loadedPackages["jekyll"]).toBeDefined()
describe 'in Atom', ->
[workspaceElement, editorView, editor] = []
beforeEach ->
directory = temp.mkdirSync()
atom.project.setPaths([directory])
workspaceElement = atom.views.getView(atom.workspace)
editor = atom.workspace.getActiveTextEditor()
editorView = atom.views.getView(editor)
waitsForPromise ->
atom.packages.activatePackage('jekyll')
it 'should have activated', ->
expect(atom.packages.isPackageActive('jekyll')).toBe true
describe 'when the toolbar is opened', ->
it 'should put the toolbar in the bottom panel', ->
atom.commands.dispatch editorView, 'jekyll:toolbar'
runs ->
expect(workspaceElement.querySelector('.jekyll-manager-panel')).toBeDefined()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment