From 12d56926e51a86819dfb2c514fb034b9f643dfd4 Mon Sep 17 00:00:00 2001 From: oleg Date: Tue, 5 May 2015 00:41:23 +0300 Subject: [PATCH] fix distributor tests - mock executor must be emitter now --- test/distributor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/distributor.js b/test/distributor.js index 1def2c9..3978b54 100644 --- a/test/distributor.js +++ b/test/distributor.js @@ -2,7 +2,8 @@ var Distributor = require('../lib/distributor').Distributor, Node = require('../lib/node').Node, - expect = require('expect.js'); + expect = require('expect.js'), + EventEmitter = require('events').EventEmitter; describe('Distributor', function() { @@ -13,7 +14,9 @@ describe('Distributor', function() { return function(params) { var node = new Node(params); node._createExecutor = function() { - return {run: executorRun}; + var executor = new EventEmitter(); + executor.run = executorRun; + return executor; }; return node; };