refactor: cleanup error type
[poolifier.git] / tests / pools / selection-strategies / worker-choice-strategy-context.test.js
index 63e58d57ed3a9bec4ce6d92c61283379385f2a04..df8cd25cb375a4aa50db889c7b014e4c17b22f9c 100644 (file)
@@ -115,18 +115,14 @@ describe('Worker choice strategy context test suite', () => {
       WorkerChoiceStrategyUndefinedStub
     )
     expect(() => workerChoiceStrategyContext.execute()).toThrowError(
-      new TypeError(
-        'Worker node key chosen is null or undefined after 6 retries'
-      )
+      new Error('Worker node key chosen is null or undefined after 6 retries')
     )
     workerChoiceStrategyContext.workerChoiceStrategies.set(
       workerChoiceStrategyContext.workerChoiceStrategy,
       WorkerChoiceStrategyNullStub
     )
     expect(() => workerChoiceStrategyContext.execute()).toThrowError(
-      new TypeError(
-        'Worker node key chosen is null or undefined after 6 retries'
-      )
+      new Error('Worker node key chosen is null or undefined after 6 retries')
     )
   })