Commit | Line | Data |
---|---|---|
a61a0724 | 1 | const { expect } = require('expect') |
fd027a65 S |
2 | const { ClusterWorker } = require('../../lib') |
3 | ||
4 | describe('Cluster worker test suite', () => { | |
8d3782fa | 5 | it('Verify worker has default maxInactiveTime', () => { |
fd027a65 | 6 | const worker = new ClusterWorker(() => {}) |
e1ffb94f | 7 | expect(worker.opts.maxInactiveTime).toStrictEqual(60000) |
fd027a65 | 8 | }) |
7fc5cce6 | 9 | |
318d4156 | 10 | it('Verify that handleError() method works properly', () => { |
7fc5cce6 APA |
11 | const errorMessage = 'Error as a string' |
12 | const worker = new ClusterWorker(() => {}) | |
78cea37e | 13 | expect(worker.handleError(errorMessage)).toStrictEqual(errorMessage) |
7fc5cce6 | 14 | }) |
fd027a65 | 15 | }) |