2017-01-08 20:47:15 +00:00
|
|
|
/*globals describe, it*/
|
2017-02-19 17:51:32 +00:00
|
|
|
var Console = require('../lib/dashboard/console.js');
|
|
|
|
var Plugins = require('../lib/core/plugins.js');
|
2017-01-08 20:47:15 +00:00
|
|
|
var assert = require('assert');
|
2017-03-08 14:49:43 +00:00
|
|
|
var version = require('../package.json')['version'];
|
2017-01-08 20:47:15 +00:00
|
|
|
|
|
|
|
describe('embark.Console', function() {
|
2017-01-29 06:28:01 +00:00
|
|
|
var plugins = new Plugins({plugins: {}});
|
2017-03-08 14:49:43 +00:00
|
|
|
var console = new Console({plugins: plugins, version: version});
|
2017-01-08 20:47:15 +00:00
|
|
|
|
|
|
|
describe('#executeCmd', function() {
|
|
|
|
|
|
|
|
describe('command: help', function() {
|
|
|
|
|
2017-01-13 01:42:33 +00:00
|
|
|
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');
|
2017-03-08 14:49:43 +00:00
|
|
|
assert.equal(lines[0], 'Welcome to Embark ' + version);
|
2017-01-08 20:47:15 +00:00
|
|
|
assert.equal(lines[2], 'possible commands are:');
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|