smartcli/test/test.ts

36 lines
1.1 KiB
TypeScript
Raw Normal View History

2016-10-14 23:06:36 +00:00
import 'typings-test'
2016-06-10 00:27:04 +00:00
2016-10-14 23:06:36 +00:00
import smartcli = require('../dist/index')
2016-11-19 12:43:06 +00:00
import * as should from 'should'
2015-10-14 18:59:01 +00:00
2016-10-14 23:06:36 +00:00
describe('smartcli.Smartcli class',function(){
2016-10-15 00:12:10 +00:00
let smartCliTestObject: smartcli.Smartcli
2016-10-14 23:06:36 +00:00
describe('new Smartcli()',function(){
it('should create a new Smartcli',function(){
smartCliTestObject = new smartcli.Smartcli()
2016-11-19 12:43:06 +00:00
should(smartCliTestObject).be.instanceof(smartcli.Smartcli)
2016-10-14 23:06:36 +00:00
})
})
describe('.addCommand',function(){
it('should add an command',function(){
2016-06-10 02:13:23 +00:00
smartCliTestObject.addCommand({
2016-10-15 00:12:10 +00:00
commandName: 'awesome'
2016-10-14 23:06:36 +00:00
})
})
})
describe('.standardTask',function(){
it('should start parsing a standardTask',function(done){
2016-06-10 02:13:23 +00:00
smartCliTestObject.standardTask()
.then(() => {
2016-10-14 23:06:36 +00:00
console.log('this is the standard Task!')
})
done()
2016-06-10 02:13:23 +00:00
})
})
2016-10-14 23:06:36 +00:00
describe('.startParse',function(){
it('should start parsing the CLI input',function(){
smartCliTestObject.startParse()
2016-06-10 02:13:23 +00:00
})
})
2016-10-14 23:06:36 +00:00
})