js-algorithms/index.js

11 lines
242 B
JavaScript
Raw Normal View History

2015-07-24 06:44:18 +00:00
var child = require('child_process'),
args = process.argv.slice(1);
if (args.indexOf('test') > -1) {
var path = args[2];
var tmp = '.tmp/test.js';
child.execSync('babel ' + path + ' > ' + tmp);
child.execSync('mocha ' + tmp);
}