embark/test/console.js

26 lines
786 B
JavaScript
Raw Normal View History

2017-01-08 20:47:15 +00:00
/*globals describe, it*/
2018-08-09 12:30:58 +00:00
let Console = require('../cmd/dashboard/console.js');
2017-03-29 17:57:22 +00:00
let Plugins = require('../lib/core/plugins.js');
let assert = require('assert');
let version = require('../package.json').version;
2017-01-08 20:47:15 +00:00
describe('embark.Console', function() {
2017-03-29 17:57:22 +00:00
let plugins = new Plugins({plugins: {}});
let console = new Console({plugins: plugins, version: version});
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) {
2017-03-29 17:57:22 +00:00
let lines = output.split('\n');
assert.equal(lines[0], 'Welcome to Embark ' + version);
2017-01-08 20:47:15 +00:00
assert.equal(lines[2], 'possible commands are:');
done();
});
});
});
});
});