put job info under job property on success emitter

This commit is contained in:
2016-07-11 10:27:08 -07:00
parent 3b135bbd09
commit 27390fef44
2 changed files with 9 additions and 5 deletions

View File

@@ -601,13 +601,17 @@ describe('Worker class', function () {
worker.once(constants.EVENT_WORKER_COMPLETE, (workerJob) => {
try {
expect(workerJob).to.have.property('id');
expect(workerJob).to.have.property('index');
expect(workerJob).to.have.property('type');
expect(workerJob).to.not.have.property('_source');
expect(workerJob).to.have.property('job');
expect(workerJob.job).to.have.property('id');
expect(workerJob.job).to.have.property('index');
expect(workerJob.job).to.have.property('type');
expect(workerJob).to.have.property('output');
expect(workerJob.output).to.have.property('content');
expect(workerJob.output).to.have.property('content_type');
expect(workerJob).to.not.have.property('_source');
done();
} catch (e) {
done(e);