perf: drastically reduce worker nodes array lookups
[poolifier.git] / tests / pools / selection-strategies / worker-choice-strategy-context.test.js
index 2070f8e03301aca85ac8215c52e96e11bb065acd..808a44cb096b77894b0ad34fd3a1c865091c0722 100644 (file)
@@ -115,14 +115,14 @@ describe('Worker choice strategy context test suite', () => {
       WorkerChoiceStrategyUndefinedStub
     )
     expect(() => workerChoiceStrategyContext.execute()).toThrowError(
-      new Error('Worker node key chosen is null or undefined')
+      new TypeError('Worker node key chosen is null or undefined')
     )
     workerChoiceStrategyContext.workerChoiceStrategies.set(
       workerChoiceStrategyContext.workerChoiceStrategy,
       WorkerChoiceStrategyNullStub
     )
     expect(() => workerChoiceStrategyContext.execute()).toThrowError(
-      new Error('Worker node key chosen is null or undefined')
+      new TypeError('Worker node key chosen is null or undefined')
     )
   })