mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user