refactor: remove unneeded conditions at worker file path checking
[poolifier.git] / tests / pools / abstract-pool.test.mjs
index 041c62a2b1277c179d689dbe182d6b382fc55cef..765a2b0d1553febb95feb3fd36307e6f2eacda66 100644 (file)
@@ -66,20 +66,8 @@ describe('Abstract pool test suite', () => {
   })
 
   it('Verify that filePath is checked', () => {
-    const expectedError = new Error(
-      'Please specify a file with a worker implementation'
-    )
     expect(() => new FixedThreadPool(numberOfWorkers)).toThrowError(
-      expectedError
-    )
-    expect(() => new FixedThreadPool(numberOfWorkers, '')).toThrowError(
-      expectedError
-    )
-    expect(() => new FixedThreadPool(numberOfWorkers, 0)).toThrowError(
-      expectedError
-    )
-    expect(() => new FixedThreadPool(numberOfWorkers, true)).toThrowError(
-      expectedError
+      new Error("Cannot find the worker file 'undefined'")
     )
     expect(
       () => new FixedThreadPool(numberOfWorkers, './dummyWorker.ts')