Skip to content

Commit a331d0a

Browse files
committed
fix: fixed test
1 parent 03135cf commit a331d0a

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/javascript-sdk/src/fr-webauthn/fr-webauthn.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
webAuthnAuthConditionalMetaCallback,
2525
} from './fr-webauthn.mock.data';
2626
import FRStep from '../fr-auth/fr-step';
27+
import Config from '../config';
2728

2829
describe('Test FRWebAuthn class with 6.5.3 "Passwordless"', () => {
2930
it('should return Registration type with register text-output callbacks', () => {
@@ -165,7 +166,16 @@ describe('Test FRWebAuthn class with Conditional UI', () => {
165166
expect(publicKey.allowCredentials).toBeUndefined();
166167
});
167168

168-
it('should warn and fallback if conditional UI is requested but not supported', async () => {
169+
it('should warn and return false if conditional UI is requested but not supported', async () => {
170+
Config.set({
171+
serverConfig: {
172+
baseUrl: 'http://localhost:8080',
173+
},
174+
clientId: 'test',
175+
realmPath: 'alpha',
176+
logLevel: 'warn',
177+
});
178+
169179
// Mock browser support for conditional UI to be false
170180
vi.spyOn(window.PublicKeyCredential, 'isConditionalMediationAvailable').mockResolvedValue(
171181
false,

0 commit comments

Comments
 (0)