fix: fix worker function type definition and validation
[poolifier.git] / tests / pools / selection-strategies / selection-strategies.test.js
index 52285d7163f1228a5691b26bb8e1b19e6bf12af5..2fcbba5a95054b20311baa45892e26f24733b1fe 100644 (file)
@@ -705,7 +705,7 @@ describe('Selection strategies test suite', () => {
     await pool.destroy()
   })
 
-  it('Verify unknown strategies throw error', () => {
+  it('Verify unknown strategy throw error', () => {
     expect(
       () =>
         new DynamicThreadPool(
@@ -714,8 +714,6 @@ describe('Selection strategies test suite', () => {
           './tests/worker-files/thread/testWorker.js',
           { workerChoiceStrategy: 'UNKNOWN_STRATEGY' }
         )
-    ).toThrowError(
-      new Error("Invalid worker choice strategy 'UNKNOWN_STRATEGY'")
-    )
+    ).toThrowError("Invalid worker choice strategy 'UNKNOWN_STRATEGY'")
   })
 })