smartcli/ts/test.ts

22 lines
596 B
TypeScript
Raw Normal View History

2015-10-05 21:33:57 +00:00
/// <reference path="typings/tsd.d.ts" />
var smartcli = require("./index.js");
var getAnswerTest = function() {
smartcli.getAnswer('How do you feel?',function(answer){
console.log('The answer is: ' + answer);
getChoiceTest();
});
};
var getChoiceTest = function() {
2015-10-05 22:45:52 +00:00
smartcli.getChoice('What music do you like to hear?',['Jazz','Blues','Classical'],function(answer){
2015-10-05 21:33:57 +00:00
console.log('The answer is: ' + answer);
getCwdTest();
});
};
var getCwdTest = function(){
console.log('The current directory is: ' + smartcli.getCwd());
};
getAnswerTest();