add small test for console

This commit is contained in:
Iuri Matias 2017-01-08 15:47:15 -05:00
parent 6f8916f40f
commit 59c63b98e1
1 changed files with 22 additions and 0 deletions

22
test/console.js Normal file
View File

@ -0,0 +1,22 @@
/*globals describe, it*/
var Console = require('../lib/console.js');
var assert = require('assert');
describe('embark.Console', function() {
var console = new Console();
describe('#executeCmd', function() {
describe('command: help', function() {
it('i should provide a help text', function(done) {
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();
});
});
});
});
});