})
it('Verify that dynamic pool sizing is checked', () => {
+ expect(
+ () =>
+ new DynamicClusterPool(
+ 1,
+ undefined,
+ './tests/worker-files/cluster/testWorker.js'
+ )
+ ).toThrowError(
+ new TypeError(
+ 'Cannot instantiate a dynamic pool without specifying the maximum pool size'
+ )
+ )
expect(
() =>
new DynamicThreadPool(
new DynamicClusterPool(
0,
0.5,
- './tests/worker-files/thread/testWorker.js'
+ './tests/worker-files/cluster/testWorker.js'
)
).toThrowError(
new TypeError(
new DynamicClusterPool(
1,
1,
- './tests/worker-files/thread/testWorker.js'
+ './tests/worker-files/cluster/testWorker.js'
)
).toThrowError(
new RangeError(