qunit_notifier
Version:
Run Qunit tests headless and show results on a notification system like Growl/Snarl/Libnorify
41 lines (33 loc) • 672 B
JavaScript
// dependencies
var snarlapi = require('growler');
/**
* Growl connector class
*/
var Snarl = function(){
this.app;
};
/**
* Register app
*
* Register application in Growl notification system
*/
Snarl.prototype.register = function(title){
this.app = new snarlapi.GrowlApplication(title);
this.app.setNotifications({
'Server Status': {}
});
this.app.register();
}
/**
* Send message
*
* Send a message with title, text and icon
*/
Snarl.prototype.send = function(arg){
this.app.sendNotification('Server Status', {
title: arg.title,
text: arg.text,
icon: arg.icon
});
}
module.exports = new Snarl();