Update dependencies (#279)
[poolifier.git] / tests / worker / cluster-worker.test.js
CommitLineData
fd027a65
S
1const expect = require('expect')
2const { ClusterWorker } = require('../../lib')
3
4describe('Cluster worker test suite', () => {
8d3782fa 5 it('Verify worker has default maxInactiveTime', () => {
fd027a65
S
6 const worker = new ClusterWorker(() => {})
7 expect(worker.maxInactiveTime).toEqual(60_000)
8 })
7fc5cce6
APA
9
10 it('Verify that handleError function works properly', () => {
11 const errorMessage = 'Error as a string'
12 const worker = new ClusterWorker(() => {})
13 expect(worker.handleError(errorMessage)).toBe(errorMessage)
14 })
fd027a65 15})