From 42af68d763539f3863169f1be619ad45dffd76b9 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 6 Jun 2022 15:36:14 -0400 Subject: [PATCH] Remove side-effect in override Signed-off-by: Sebastian Malton --- .../components/test-utils/get-application-builder.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/renderer/components/test-utils/get-application-builder.tsx b/src/renderer/components/test-utils/get-application-builder.tsx index 7dc5976b6d..c4957df3b1 100644 --- a/src/renderer/components/test-utils/get-application-builder.tsx +++ b/src/renderer/components/test-utils/get-application-builder.tsx @@ -153,14 +153,11 @@ export const getApplicationBuilder = () => { mainDi.override(clusterStoreInjectable, () => clusterStoreStub); mainDi.override(randomBytesInjectable, () => { - let callId = 0; - return async (count) => { - const currentCallId = callId += 1; - const values = new Array(count); + const values = []; for (let i = 0; i < count; i += 1) { - values[i] = ((i + currentCallId) << 2) ^ currentCallId; + values[i] = i; } return Buffer.from(values);