nci/test/distributor/helpers.js
2015-06-15 23:56:09 +03:00

20 lines
408 B
JavaScript

'use strict';
var Node = require('../../lib/node').Node,
EventEmitter = require('events').EventEmitter;
exports.createNodeMock = function(executorRun) {
return function(params) {
var node = new Node(params);
node._createExecutor = function(project) {
var executor = new EventEmitter();
executor.project = project;
executor.run = executorRun;
return executor;
};
return node;
};
};