@@ -153,7 +153,6 @@ describe('internal api', () => {
153153 } ) ;
154154
155155 it ( 'resolves with a dummy token and an error if failed to get a token' , async ( ) => {
156- const errorStub = stub ( console , 'error' ) ;
157156 const appCheck = initializeAppCheck ( app , {
158157 provider : new ReCaptchaV3Provider ( FAKE_SITE_KEY )
159158 } ) ;
@@ -170,14 +169,9 @@ describe('internal api', () => {
170169 token : formatDummyToken ( defaultTokenErrorData ) ,
171170 error
172171 } ) ;
173- expect ( errorStub . args [ 0 ] [ 1 ] . message ) . to . include (
174- 'oops, something went wrong'
175- ) ;
176- errorStub . restore ( ) ;
177172 } ) ;
178173
179174 it ( 'resolves with a dummy token and an error if failed to get a token in debug mode' , async ( ) => {
180- const errorStub = stub ( console , 'error' ) ;
181175 window . FIREBASE_APPCHECK_DEBUG_TOKEN = true ;
182176 const appCheck = initializeAppCheck ( app , {
183177 provider : new ReCaptchaV3Provider ( FAKE_SITE_KEY )
@@ -192,15 +186,10 @@ describe('internal api', () => {
192186 token : formatDummyToken ( defaultTokenErrorData ) ,
193187 error
194188 } ) ;
195- expect ( errorStub . args [ 0 ] [ 1 ] . message ) . to . include (
196- 'oops, something went wrong'
197- ) ;
198189 delete window . FIREBASE_APPCHECK_DEBUG_TOKEN ;
199- errorStub . restore ( ) ;
200190 } ) ;
201191
202192 it ( 'resolves with a dummy token and an error if recaptcha failed' , async ( ) => {
203- const errorStub = stub ( console , 'error' ) ;
204193 const appCheck = initializeAppCheck ( app , {
205194 provider : new ReCaptchaV3Provider ( FAKE_SITE_KEY )
206195 } ) ;
@@ -213,10 +202,6 @@ describe('internal api', () => {
213202 expect ( reCAPTCHASpy ) . to . be . called ;
214203 expect ( exchangeTokenStub ) . to . not . be . called ;
215204 expect ( token . token ) . to . equal ( formatDummyToken ( defaultTokenErrorData ) ) ;
216- expect ( errorStub . args [ 0 ] [ 1 ] . message ) . to . include (
217- AppCheckError . RECAPTCHA_ERROR
218- ) ;
219- errorStub . restore ( ) ;
220205 } ) ;
221206
222207 it ( 'notifies listeners using cached token' , async ( ) => {
@@ -290,7 +275,6 @@ describe('internal api', () => {
290275 } ) ;
291276
292277 it ( 'calls 3P error handler if there is an error getting a token' , async ( ) => {
293- stub ( console , 'error' ) ;
294278 const appCheck = initializeAppCheck ( app , {
295279 provider : new ReCaptchaV3Provider ( FAKE_SITE_KEY ) ,
296280 isTokenAutoRefreshEnabled : true
@@ -314,7 +298,6 @@ describe('internal api', () => {
314298 } ) ;
315299
316300 it ( 'ignores listeners that throw' , async ( ) => {
317- stub ( console , 'error' ) ;
318301 const appCheck = initializeAppCheck ( app , {
319302 provider : new ReCaptchaV3Provider ( FAKE_SITE_KEY ) ,
320303 isTokenAutoRefreshEnabled : true
0 commit comments