From 601ed66a38985b87d85d74e0efda9b483ae4ce34 Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 24 Sep 2026 13:22:49 +0200 Subject: [PATCH] test(mobile): the backup-code download revokes its URL after the shared delay The mobile twin of the AccountTab test still expected the object URL to be revoked in the same tick. Since both screens download through downloadBlob, the revoke happens after its 100 ms grace period. --- client/tests/unit/mobile/settings/MSettingsAccount.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/tests/unit/mobile/settings/MSettingsAccount.test.tsx b/client/tests/unit/mobile/settings/MSettingsAccount.test.tsx index 850e8400a..168ea4772 100644 --- a/client/tests/unit/mobile/settings/MSettingsAccount.test.tsx +++ b/client/tests/unit/mobile/settings/MSettingsAccount.test.tsx @@ -634,7 +634,7 @@ describe('MSettingsAccount – backup codes', () => { expect(createObjectURL).toHaveBeenCalledWith(expect.any(Blob)); expect(downloadName).toBe('trek-mfa-backup-codes.txt'); - expect(revokeObjectURL).toHaveBeenCalledWith('blob:codes'); + await waitFor(() => expect(revokeObjectURL).toHaveBeenCalledWith('blob:codes')); expect(document.querySelector('a[download]')).toBeNull(); createObjectURL.mockRestore();