smartcli/test/test.js
2016-11-19 13:43:06 +01:00

35 lines
2.4 KiB
JavaScript

"use strict";
require("typings-test");
const smartcli = require("../dist/index");
const should = require("should");
describe('smartcli.Smartcli class', function () {
let smartCliTestObject;
describe('new Smartcli()', function () {
it('should create a new Smartcli', function () {
smartCliTestObject = new smartcli.Smartcli();
should(smartCliTestObject).be.instanceof(smartcli.Smartcli);
});
});
describe('.addCommand', function () {
it('should add an command', function () {
smartCliTestObject.addCommand({
commandName: 'awesome'
});
});
});
describe('.standardTask', function () {
it('should start parsing a standardTask', function (done) {
smartCliTestObject.standardTask()
.then(() => {
console.log('this is the standard Task!');
});
done();
});
});
describe('.startParse', function () {
it('should start parsing the CLI input', function () {
smartCliTestObject.startParse();
});
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUVyQiwwQ0FBMEM7QUFDMUMsaUNBQWdDO0FBRWhDLFFBQVEsQ0FBQyx5QkFBeUIsRUFBQztJQUMvQixJQUFJLGtCQUFxQyxDQUFBO0lBQ3pDLFFBQVEsQ0FBQyxnQkFBZ0IsRUFBQztRQUN0QixFQUFFLENBQUMsOEJBQThCLEVBQUM7WUFDOUIsa0JBQWtCLEdBQUcsSUFBSSxRQUFRLENBQUMsUUFBUSxFQUFFLENBQUE7WUFDNUMsTUFBTSxDQUFDLGtCQUFrQixDQUFDLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLENBQUE7UUFDL0QsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDLENBQUMsQ0FBQTtJQUNGLFFBQVEsQ0FBQyxhQUFhLEVBQUM7UUFDbkIsRUFBRSxDQUFDLHVCQUF1QixFQUFDO1lBQ3ZCLGtCQUFrQixDQUF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