smartcli/test/test.js

35 lines
2.4 KiB
JavaScript
Raw Normal View History

"use strict";
require("typings-test");
2016-08-26 07:21:42 +00:00
const smartcli = require("../dist/index");
2016-11-19 12:43:06 +00:00
const should = require("should");
describe('smartcli.Smartcli class', function () {
2016-08-26 07:21:42 +00:00
let smartCliTestObject;
2016-11-19 12:43:06 +00:00
describe('new Smartcli()', function () {
it('should create a new Smartcli', function () {
2016-06-10 02:13:23 +00:00
smartCliTestObject = new smartcli.Smartcli();
2016-11-19 12:43:06 +00:00
should(smartCliTestObject).be.instanceof(smartcli.Smartcli);
2016-06-10 02:13:23 +00:00
});
});
2016-11-19 12:43:06 +00:00
describe('.addCommand', function () {
it('should add an command', function () {
2016-06-10 02:13:23 +00:00
smartCliTestObject.addCommand({
2016-11-19 12:43:06 +00:00
commandName: 'awesome'
2016-06-10 02:13:23 +00:00
});
});
});
2016-11-19 12:43:06 +00:00
describe('.standardTask', function () {
it('should start parsing a standardTask', function (done) {
2016-06-10 02:13:23 +00:00
smartCliTestObject.standardTask()
2016-08-26 07:21:42 +00:00
.then(() => {
2016-11-19 12:43:06 +00:00
console.log('this is the standard Task!');
2016-06-10 02:13:23 +00:00
});
done();
});
});
2016-11-19 12:43:06 +00:00
describe('.startParse', function () {
it('should start parsing the CLI input', function () {
2016-06-10 02:13:23 +00:00
smartCliTestObject.startParse();
});
});
});
2016-11-19 12:43:06 +00:00
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUVyQiwwQ0FBMEM7QUFDMUMsaUNBQWdDO0FBRWhDLFFBQVEsQ0FBQyx5QkFBeUIsRUFBQztJQUMvQixJQUFJLGtCQUFxQyxDQUFBO0lBQ3pDLFFBQVEsQ0FBQyxnQkFBZ0IsRUFBQztRQUN0QixFQUF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