repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pool busy event emitting on all pool types (#241)
[poolifier.git]
/
tests
/
worker
/
cluster-worker.test.js
diff --git
a/tests/worker/cluster-worker.test.js
b/tests/worker/cluster-worker.test.js
index fc2d3442eb58fd816601cea6d8a7bc0384dd380b..196564a48c51aee9e32a2f4af7cd91208d9b92de 100644
(file)
--- a/
tests/worker/cluster-worker.test.js
+++ b/
tests/worker/cluster-worker.test.js
@@
-2,9
+2,14
@@
const expect = require('expect')
const { ClusterWorker } = require('../../lib')
describe('Cluster worker test suite', () => {
const { ClusterWorker } = require('../../lib')
describe('Cluster worker test suite', () => {
- // Skipped because ClusterWorker would be in main instead of non-main worker
- it.skip('Verify worker has default maxInactiveTime', () => {
+ it('Verify worker has default maxInactiveTime', () => {
const worker = new ClusterWorker(() => {})
expect(worker.maxInactiveTime).toEqual(60_000)
})
const worker = new ClusterWorker(() => {})
expect(worker.maxInactiveTime).toEqual(60_000)
})
+
+ it('Verify that handleError function works properly', () => {
+ const errorMessage = 'Error as a string'
+ const worker = new ClusterWorker(() => {})
+ expect(worker.handleError(errorMessage)).toBe(errorMessage)
+ })
})
})