mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 21:11:14 +00:00
test(native): the handoff page's fixture knows the passkey step, and the hook test keeps the real API client around its passkey mocks
This commit is contained in:
@@ -22,9 +22,13 @@ vi.mock('../../native/browserSignIn', () => ({
|
||||
}));
|
||||
|
||||
vi.mock('@simplewebauthn/browser', () => ({ startAuthentication: vi.fn() }));
|
||||
vi.mock('../../api/client', () => ({
|
||||
authApi: { passkey: { loginOptions: vi.fn(), loginVerify: vi.fn() } },
|
||||
}));
|
||||
vi.mock('../../api/client', async () => {
|
||||
const actual = await vi.importActual<typeof import('../../api/client')>('../../api/client');
|
||||
return {
|
||||
...actual,
|
||||
authApi: { ...actual.authApi, passkey: { ...actual.authApi.passkey, loginOptions: vi.fn(), loginVerify: vi.fn() } },
|
||||
};
|
||||
});
|
||||
|
||||
const challenge = 'ab'.repeat(32);
|
||||
const realLocation = window.location;
|
||||
|
||||
Reference in New Issue
Block a user