From 23f8b95ba730b88ba69375b798ff24b1479f908c Mon Sep 17 00:00:00 2001 From: Imants Date: Tue, 27 Oct 2026 18:58:01 +0200 Subject: [PATCH] fix: make cache lookup test deterministic --- src/shared/lib/translations/__tests__/Translator.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/lib/translations/__tests__/Translator.test.ts b/src/shared/lib/translations/__tests__/Translator.test.ts index 11acd48..6907f50 100644 --- a/src/shared/lib/translations/__tests__/Translator.test.ts +++ b/src/shared/lib/translations/__tests__/Translator.test.ts @@ -660,6 +660,7 @@ describe('Translator SHA-256 fingerprint', () => it('translateBatch reaches cache lookup without crypto.subtle', async () => { + jest.spyOn(Math, 'random').mockReturnValue(0.5); Object.defineProperty(globalThis, 'crypto', { value: {}, configurable: true,