embark-area-51/test/console.js

25 lines
694 B
JavaScript
Raw Normal View History

2017-01-08 20:47:15 +00:00
/*globals describe, it*/
var Console = require('../lib/console.js');
2017-01-29 06:28:01 +00:00
var Plugins = require('../lib/plugins.js');
2017-01-08 20:47:15 +00:00
var assert = require('assert');
describe('embark.Console', function() {
2017-01-29 06:28:01 +00:00
var plugins = new Plugins({plugins: {}});
var console = new Console({plugins: plugins});
2017-01-08 20:47:15 +00:00
describe('#executeCmd', function() {
describe('command: help', function() {
it('it should provide a help text', function(done) {
2017-01-08 20:47:15 +00:00
console.executeCmd('help', function(output) {
var lines = output.split('\n');
assert.equal(lines[0], 'Welcome to Embark 2');
assert.equal(lines[2], 'possible commands are:');
done();
});
});
});
});
});