expect(typeof inError === 'string').toBe(true)
expect(inError).toBe('Error Message from ClusterWorker')
expect(taskError).toStrictEqual({
- workerId: expect.any(Number),
message: 'Error Message from ClusterWorker',
data
})
expect(typeof inError === 'string').toBe(true)
expect(inError).toBe('Error Message from ClusterWorker:async')
expect(taskError).toStrictEqual({
- workerId: expect.any(Number),
message: 'Error Message from ClusterWorker:async',
data
})
expect(
() =>
new FixedClusterPool(0, './tests/worker-files/cluster/testWorker.js')
- ).toThrowError('Cannot instantiate a fixed pool with no worker')
+ ).toThrowError('Cannot instantiate a fixed pool with zero worker')
})
})