You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
526 B
24 lines
526 B
|
7 months ago
|
/*
|
||
|
|
* helpers.js: Test helpers for using broadway.
|
||
|
|
*
|
||
|
|
* (C) 2011, Nodejitsu Inc.
|
||
|
|
* MIT LICENSE
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
|
||
|
|
var events = require('eventemitter2'),
|
||
|
|
broadway = require('../../lib/broadway');
|
||
|
|
|
||
|
|
var helpers = exports;
|
||
|
|
|
||
|
|
helpers.findApp = function () {
|
||
|
|
return Array.prototype.slice.call(arguments).filter(function (arg) {
|
||
|
|
return arg instanceof events.EventEmitter2;
|
||
|
|
})[0];
|
||
|
|
};
|
||
|
|
|
||
|
|
helpers.mockApp = function () {
|
||
|
|
var mock = new events.EventEmitter2({ delimiter: '::', wildcard: true });
|
||
|
|
mock.options = {};
|
||
|
|
return mock;
|
||
|
|
};
|