fix(tbank): isolate caches by connection generation

This commit is contained in:
2026-09-01 05:55:01 +03:00
parent da17893350
commit 19fe7e75d5
10 changed files with 317 additions and 59 deletions
+3
View File
@@ -6,9 +6,12 @@ describe('TbankCrypto', () => {
'MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=',
);
const encrypted = crypto.encrypt('secret-token');
const replacement = crypto.encrypt('secret-token');
expect(encrypted).not.toContain('secret-token');
expect(replacement).not.toBe(encrypted);
expect(crypto.decrypt(encrypted)).toBe('secret-token');
expect(crypto.decrypt(replacement)).toBe('secret-token');
expect(() => TbankCrypto.fromBase64('invalid')).toThrow(
'Invalid token encryption key',
);