@@ -149,7 +149,7 @@ describe('Test FRWebAuthn class with Conditional UI', () => {
149149 _allowCredentials : [ ] ,
150150 timeout : 60000 ,
151151 userVerification : 'preferred' ,
152- conditionalWebAuthn : true ,
152+ mediation : 'conditional' ,
153153 relyingPartyId : '' ,
154154 _relyingPartyId : 'example.com' ,
155155 extensions : { } ,
@@ -180,19 +180,10 @@ describe('Test FRWebAuthn class with Conditional UI', () => {
180180 vi . spyOn ( window . PublicKeyCredential , 'isConditionalMediationAvailable' ) . mockResolvedValue (
181181 false ,
182182 ) ;
183- // FIX APPLIED HERE: Added block comment to empty function
184- const consoleSpy = vi . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => {
185- /* empty */
186- } ) ;
187183 const getSpy = vi . spyOn ( navigator . credentials , 'get' ) ;
188184
189185 // Attempt to authenticate with conditional UI requested
190- await FRWebAuthn . getAuthenticationCredential ( { } , true ) ;
191-
192- // Expect a warning to be logged
193- expect ( consoleSpy ) . toHaveBeenCalledWith (
194- 'Conditional UI was requested, but is not supported by this browser.' ,
195- ) ;
186+ await FRWebAuthn . getAuthenticationCredential ( { } ) ;
196187
197188 // Expect the call to navigator.credentials.get to NOT have the mediation property
198189 expect ( getSpy ) . toHaveBeenCalledWith (
@@ -208,7 +199,9 @@ describe('Test FRWebAuthn class with Conditional UI', () => {
208199 const getSpy = vi . spyOn ( navigator . credentials , 'get' ) ;
209200
210201 // Attempt to authenticate with conditional UI requested
211- await FRWebAuthn . getAuthenticationCredential ( { } , true ) ;
202+ await FRWebAuthn . getAuthenticationCredential ( {
203+ mediation : 'conditional' ,
204+ } ) ;
212205
213206 // Expect the call to navigator.credentials.get to have the mediation property
214207 expect ( getSpy ) . toHaveBeenCalledWith (
0 commit comments