repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore: v3.1.2
[poolifier.git]
/
tests
/
pools
/
abstract-pool.test.mjs
diff --git
a/tests/pools/abstract-pool.test.mjs
b/tests/pools/abstract-pool.test.mjs
index edf03f4ae327b4f7c79fe9a1a9c9917c91de6e19..21cf10c8ebab4ae298e2efb98e0b0f9921f1791e 100644
(file)
--- a/
tests/pools/abstract-pool.test.mjs
+++ b/
tests/pools/abstract-pool.test.mjs
@@
-78,7
+78,10
@@
describe('Abstract pool test suite', () => {
it('Verify that filePath is checked', () => {
expect(() => new FixedThreadPool(numberOfWorkers)).toThrow(
it('Verify that filePath is checked', () => {
expect(() => new FixedThreadPool(numberOfWorkers)).toThrow(
- new Error("Cannot find the worker file 'undefined'")
+ new TypeError('The worker file path must be specified')
+ )
+ expect(() => new FixedThreadPool(numberOfWorkers, 0)).toThrow(
+ new TypeError('The worker file path must be a string')
)
expect(
() => new FixedThreadPool(numberOfWorkers, './dummyWorker.ts')
)
expect(
() => new FixedThreadPool(numberOfWorkers, './dummyWorker.ts')
@@
-1264,7
+1267,7
@@
describe('Abstract pool test suite', () => {
stolenTasks: expect.any(Number),
failedTasks: expect.any(Number)
})
stolenTasks: expect.any(Number),
failedTasks: expect.any(Number)
})
- expect(pool.hasBackPressure.call
ed).toBe(true
)
+ expect(pool.hasBackPressure.call
Count).toBe(5
)
await pool.destroy()
})
await pool.destroy()
})