@@ -1225,7 +1225,7 @@ describe('admin.auth', () => {
12251225 return getAuth ( ) . projectConfigManager ( ) . updateProjectConfig ( projectConfigOption1 )
12261226 . then ( ( actualProjectConfig ) => {
12271227 // verify account defender is enabled.
1228- expect ( actualProjectConfig . recaptchaConfig . useAccountDefender ) . to . be . true ;
1228+ expect ( actualProjectConfig . recaptchaConfig ? .useAccountDefender ) . to . be . true ;
12291229 // attempt to disable reCAPTCHA.
12301230 return getAuth ( ) . projectConfigManager ( ) . updateProjectConfig ( projectConfigOption3 )
12311231 . should . eventually . be . rejected . and . have . property ( 'code' , 'auth/invalid-config' ) ;
@@ -1810,12 +1810,17 @@ describe('admin.auth', () => {
18101810 useAccountDefender : true ,
18111811 } ,
18121812 } ;
1813- const updatedOptions2 : UpdateTenantRequest = deepCopy ( updatedOptions ) ;
1814- updatedOptions2 . recaptchaConfig . emailPasswordEnforcementState = 'OFF' ;
1813+ const updatedOptions2 : UpdateTenantRequest = {
1814+ displayName : expectedUpdatedTenant2 . displayName ,
1815+ recaptchaConfig : {
1816+ emailPasswordEnforcementState : 'OFF' ,
1817+ useAccountDefender : true ,
1818+ } ,
1819+ } ;
18151820 // enable account defender first.
18161821 return getAuth ( ) . tenantManager ( ) . updateTenant ( createdTenantId , updatedOptions )
18171822 . then ( ( actualTenant ) => {
1818- expect ( actualTenant . recaptchaConfig . useAccountDefender ) . to . be . true ;
1823+ expect ( actualTenant . recaptchaConfig ? .useAccountDefender ) . to . be . true ;
18191824 // attempt to disable reCAPTCHA.
18201825 return getAuth ( ) . tenantManager ( ) . updateTenant ( createdTenantId , updatedOptions2 )
18211826 . should . eventually . be . rejected . and . have . property ( 'code' , 'auth/invalid-config' ) ;
0 commit comments