From 59c63b98e1877f4a926d7be0347bd893fdda8541 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 8 Jan 2017 15:47:15 -0500 Subject: [PATCH] add small test for console --- test/console.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/console.js diff --git a/test/console.js b/test/console.js new file mode 100644 index 00000000..05c3045b --- /dev/null +++ b/test/console.js @@ -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(); + }); + }); + }); + }); +});