repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump rollup from 2.42.0 to 2.42.1 (#284)
[poolifier.git]
/
tests
/
pools
/
thread
/
fixed.test.js
diff --git
a/tests/pools/thread/fixed.test.js
b/tests/pools/thread/fixed.test.js
index 3401fde316130e4330f111fb0c421e2ad4833d4f..81ef967ec5e0540abdd94a697b642b3e08c69b3e 100644
(file)
--- a/
tests/pools/thread/fixed.test.js
+++ b/
tests/pools/thread/fixed.test.js
@@
-22,16
+22,14
@@
const errorPool = new FixedThreadPool(
1,
'./tests/worker-files/thread/errorWorker.js',
{
1,
'./tests/worker-files/thread/errorWorker.js',
{
- errorHandler: e => console.error(e),
- onlineHandler: () => console.log('worker is online')
+ errorHandler: e => console.error(e)
}
)
const asyncErrorPool = new FixedThreadPool(
1,
'./tests/worker-files/thread/asyncErrorWorker.js',
{
}
)
const asyncErrorPool = new FixedThreadPool(
1,
'./tests/worker-files/thread/asyncErrorWorker.js',
{
- errorHandler: e => console.error(e),
- onlineHandler: () => console.log('worker is online')
+ errorHandler: e => console.error(e)
}
)
const asyncPool = new FixedThreadPool(
}
)
const asyncPool = new FixedThreadPool(
@@
-76,7
+74,7
@@
describe('Fixed thread pool test suite', () => {
for (let i = 0; i < numberOfThreads * 2; i++) {
promises.push(pool.execute({ test: 'test' }))
}
for (let i = 0; i < numberOfThreads * 2; i++) {
promises.push(pool.execute({ test: 'test' }))
}
- expect(poolBusy).to
Equal
(numberOfThreads)
+ expect(poolBusy).to
Be
(numberOfThreads)
})
it('Verify that is possible to have a worker that return undefined', async () => {
})
it('Verify that is possible to have a worker that return undefined', async () => {
@@
-102,7
+100,7
@@
describe('Fixed thread pool test suite', () => {
expect(inError).toBeDefined()
expect(inError).toBeInstanceOf(Error)
expect(inError.message).toBeDefined()
expect(inError).toBeDefined()
expect(inError).toBeInstanceOf(Error)
expect(inError.message).toBeDefined()
- expect(typeof inError.message === 'string').to
Equal
(true)
+ expect(typeof inError.message === 'string').to
Be
(true)
})
it('Verify that error handling is working properly:async', async () => {
})
it('Verify that error handling is working properly:async', async () => {
@@
-116,7
+114,7
@@
describe('Fixed thread pool test suite', () => {
expect(inError).toBeDefined()
expect(inError).toBeInstanceOf(Error)
expect(inError.message).toBeDefined()
expect(inError).toBeDefined()
expect(inError).toBeInstanceOf(Error)
expect(inError.message).toBeDefined()
- expect(typeof inError.message === 'string').to
Equal
(true)
+ expect(typeof inError.message === 'string').to
Be
(true)
})
it('Verify that async function is working properly', async () => {
})
it('Verify that async function is working properly', async () => {