UNPKG

qunit_notifier

Version:

Run Qunit tests headless and show results on a notification system like Growl/Snarl/Libnorify

27 lines (23 loc) 498 B
var qnotifier = require('qunit_notifier'), path = require('path'); module.exports = { run: function (cwd, args) { var config = false; if(args[2]){ try{ config = require(path.join(cwd, args[2])); } catch(e){ console.log("Cannot find module " + args[2] + " ... sorry =("); process.exit(1); } } if(config){ qnotifier.configure(config); } if(config.watch === true || config.watch === undefined){ qnotifier.watch(); } else { qnotifier.run(); } } };