make-command-runnable
Version:
Call a module's exported functions directly from the command line, with arguments.
18 lines (17 loc) • 375 B
JavaScript
module.exports = {
test_object: {
test_key: "test_value",
another_test_key: 42
}, test_func: function(){
return ('Passed in:\n' + JSON.stringify(arguments));
}, test_promising_func: function(){
return new Promise(function(resolve, reject){
setTimeout(function(){
resolve('kept!!!')
}, 200)
})
}
};
require('../custom')({
printOutputFrame: false
});