From: Jérôme Benoit Date: Tue, 3 Oct 2023 11:34:38 +0000 (+0200) Subject: refactor: cleanup variable namespace X-Git-Tag: v3.0.0~18 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=33d2304b9613b43bf8b1ee28de5bf1b8eada99c4;p=poolifier.git refactor: cleanup variable namespace Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs b/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs index e95911db..dc898e4f 100644 --- a/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs +++ b/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs @@ -53,7 +53,7 @@ describe('Worker choice strategy context test suite', () => { const workerChoiceStrategyContext = new WorkerChoiceStrategyContext( fixedPool ) - const WorkerChoiceStrategyStub = createStubInstance( + const workerChoiceStrategyStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(0) @@ -64,7 +64,7 @@ describe('Worker choice strategy context test suite', () => { ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyStub + workerChoiceStrategyStub ) const chosenWorkerKey = workerChoiceStrategyContext.execute() expect( @@ -79,13 +79,13 @@ describe('Worker choice strategy context test suite', () => { const workerChoiceStrategyContext = new WorkerChoiceStrategyContext( fixedPool ) - const WorkerChoiceStrategyUndefinedStub = createStubInstance( + const workerChoiceStrategyUndefinedStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(undefined) } ) - const WorkerChoiceStrategyNullStub = createStubInstance( + const workerChoiceStrategyNullStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(null) @@ -96,14 +96,14 @@ describe('Worker choice strategy context test suite', () => { ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyUndefinedStub + workerChoiceStrategyUndefinedStub ) expect(() => workerChoiceStrategyContext.execute()).toThrowError( new Error('Worker node key chosen is null or undefined after 6 retries') ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyNullStub + workerChoiceStrategyNullStub ) expect(() => workerChoiceStrategyContext.execute()).toThrowError( new Error('Worker node key chosen is null or undefined after 6 retries') @@ -114,7 +114,7 @@ describe('Worker choice strategy context test suite', () => { const workerChoiceStrategyContext = new WorkerChoiceStrategyContext( dynamicPool ) - const WorkerChoiceStrategyStub = createStubInstance( + const workerChoiceStrategyStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(0) @@ -125,7 +125,7 @@ describe('Worker choice strategy context test suite', () => { ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyStub + workerChoiceStrategyStub ) const chosenWorkerKey = workerChoiceStrategyContext.execute() expect(