1 const { expect
} = require('expect')
2 const { ClusterWorker
} = require('../../lib')
4 describe('Cluster worker test suite', () => {
5 it('Verify worker has default maxInactiveTime', () => {
6 const worker
= new ClusterWorker(() => {})
7 expect(worker
.opts
.maxInactiveTime
).toStrictEqual(60000)
10 it('Verify that handleError() method works properly', () => {
11 const errorMessage
= 'Error as a string'
12 const worker
= new ClusterWorker(() => {})
13 expect(worker
.handleError(errorMessage
)).toStrictEqual(errorMessage
)