expect(inError).toBeDefined()
expect(typeof inError === 'string').toBe(true)
expect(inError).toBe('Error Message from ClusterWorker')
+ expect(
+ errorPool.workerNodes.some(
+ workerNode => workerNode.tasksUsage.error === 1
+ )
+ ).toBe(true)
})
it('Verify that error handling is working properly:async', async () => {
expect(inError).toBeDefined()
expect(typeof inError === 'string').toBe(true)
expect(inError).toBe('Error Message from ClusterWorker:async')
+ expect(
+ asyncErrorPool.workerNodes.some(
+ workerNode => workerNode.tasksUsage.error === 1
+ )
+ ).toBe(true)
})
it('Verify that async function is working properly', async () => {
expect(inError.message).toBeDefined()
expect(typeof inError.message === 'string').toBe(true)
expect(inError.message).toBe('Error Message from ThreadWorker')
+ expect(
+ errorPool.workerNodes.some(
+ workerNode => workerNode.tasksUsage.error === 1
+ )
+ ).toBe(true)
})
it('Verify that error handling is working properly:async', async () => {
expect(inError.message).toBeDefined()
expect(typeof inError.message === 'string').toBe(true)
expect(inError.message).toBe('Error Message from ThreadWorker:async')
+ expect(
+ asyncErrorPool.workerNodes.some(
+ workerNode => workerNode.tasksUsage.error === 1
+ )
+ ).toBe(true)
})
it('Verify that async function is working properly', async () => {