mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 04:35:09 +00:00
fix distributor tests - mock executor must be emitter now
This commit is contained in:
parent
424cae24c6
commit
12d56926e5
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
var Distributor = require('../lib/distributor').Distributor,
|
var Distributor = require('../lib/distributor').Distributor,
|
||||||
Node = require('../lib/node').Node,
|
Node = require('../lib/node').Node,
|
||||||
expect = require('expect.js');
|
expect = require('expect.js'),
|
||||||
|
EventEmitter = require('events').EventEmitter;
|
||||||
|
|
||||||
|
|
||||||
describe('Distributor', function() {
|
describe('Distributor', function() {
|
||||||
@ -13,7 +14,9 @@ describe('Distributor', function() {
|
|||||||
return function(params) {
|
return function(params) {
|
||||||
var node = new Node(params);
|
var node = new Node(params);
|
||||||
node._createExecutor = function() {
|
node._createExecutor = function() {
|
||||||
return {run: executorRun};
|
var executor = new EventEmitter();
|
||||||
|
executor.run = executorRun;
|
||||||
|
return executor;
|
||||||
};
|
};
|
||||||
return node;
|
return node;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user