From 482ea6869220ec3e254c390fc2b2ed99f03596bf Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Mon, 25 Apr 2016 16:32:58 -0700 Subject: [PATCH] add mock client to worker tests --- test/src/worker.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/src/worker.js b/test/src/worker.js index 77ebccf..2d5e696 100644 --- a/test/src/worker.js +++ b/test/src/worker.js @@ -1,12 +1,18 @@ import expect from 'expect.js'; import { noop } from 'lodash'; import Worker from '../../lib/worker'; +import elasticsearchMock from '../fixtures/elasticsearch'; + describe('Worker class', function () { + let client; let mockQueue; beforeEach(function () { - mockQueue = {}; + client = new elasticsearchMock.Client(); + mockQueue = { + client: client + }; }); describe('invalid construction', function () {