refactor: move worker setup into worker node constructor
[poolifier.git] / tests / pools / abstract-pool.test.mjs
index edf03f4ae327b4f7c79fe9a1a9c9917c91de6e19..5dc289359c704c51fb3feef8885eb75ff449c298 100644 (file)
@@ -78,7 +78,10 @@ describe('Abstract pool test suite', () => {
 
   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')