Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
'Cannot start a pool from a worker with the same type as the pool'
)
}
- this.checkNumberOfWorkers(this.numberOfWorkers)
checkFilePath(this.filePath)
+ this.checkNumberOfWorkers(this.numberOfWorkers)
this.checkPoolOptions(this.opts)
this.chooseWorkerNode = this.chooseWorkerNode.bind(this)
})
it('Verify that numberOfWorkers is checked', () => {
- expect(() => new FixedThreadPool()).toThrowError(
+ expect(
+ () =>
+ new FixedThreadPool(
+ undefined,
+ './tests/worker-files/thread/testWorker.js'
+ )
+ ).toThrowError(
new Error(
'Cannot instantiate a pool without specifying the number of workers'
)