Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
protected readonly opts: PoolOptions<Worker>
) {
if (!this.isMain()) {
- throw new Error('Cannot start a pool from a worker!')
+ throw new Error(
+ 'Cannot start a pool from the same worker type as the current pool one'
+ )
}
this.checkNumberOfWorkers(this.numberOfWorkers)
this.checkFilePath(this.filePath)
errorHandler: (e) => console.error(e)
}
)
- ).toThrowError('Cannot start a pool from a worker!')
+ ).toThrowError(
+ 'Cannot start a pool from the same worker type as the current pool one'
+ )
})
it('Verify that filePath is checked', () => {