@@ -173,8 +173,11 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
173
173
174
174
beforeEach ( async ( ) => {
175
175
mockAuthInstance = await testAuth ( ) ;
176
- mockRequest = { } ;
176
+ mockRequest = { foo : 'bar' } ;
177
177
mockActionMethod = sinon . stub ( ) ;
178
+ sinon
179
+ . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
180
+ . resolves ( 'recaptcha-response' ) ;
178
181
} ) ;
179
182
180
183
afterEach ( ( ) => {
@@ -188,10 +191,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
188
191
sinon
189
192
. stub ( mockAuthInstance , '_getRecaptchaConfig' )
190
193
. returns ( recaptchaConfigEnforce ) ;
191
- sinon
192
- . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
193
- . resolves ( 'recaptcha-response' ) ;
194
- mockRequest = { foo : 'bar' } ;
195
194
mockActionMethod = sinon . stub ( ) . resolves ( 'testResponse' ) ;
196
195
const response = await handleRecaptchaFlow (
197
196
mockAuthInstance ,
@@ -212,10 +211,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
212
211
sinon
213
212
. stub ( mockAuthInstance , '_getRecaptchaConfig' )
214
213
. returns ( recaptchaConfigOff ) ;
215
- sinon
216
- . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
217
- . resolves ( 'recaptcha-response' ) ;
218
- mockRequest = { foo : 'bar' } ;
219
214
let callCount = 0 ;
220
215
mockActionMethod = sinon . stub ( ) . callsFake ( ( ) => {
221
216
callCount ++ ;
@@ -245,10 +240,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
245
240
sinon
246
241
. stub ( mockAuthInstance , '_getRecaptchaConfig' )
247
242
. returns ( recaptchaConfigOff ) ;
248
- sinon
249
- . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
250
- . resolves ( 'recaptcha-response' ) ;
251
- mockRequest = { foo : 'bar' } ;
252
243
let callCount = 0 ;
253
244
mockActionMethod = sinon . stub ( ) . callsFake ( ( ) => {
254
245
callCount ++ ;
@@ -281,10 +272,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
281
272
sinon
282
273
. stub ( mockAuthInstance , '_getRecaptchaConfig' )
283
274
. returns ( recaptchaConfigEnforce ) ;
284
- sinon
285
- . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
286
- . resolves ( 'recaptcha-response' ) ;
287
- mockRequest = { foo : 'bar' } ;
288
275
mockActionMethod = sinon . stub ( ) . resolves ( 'testResponse' ) ;
289
276
const response = await handleRecaptchaFlow (
290
277
mockAuthInstance ,
@@ -304,10 +291,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
304
291
sinon
305
292
. stub ( mockAuthInstance , '_getRecaptchaConfig' )
306
293
. returns ( recaptchaConfigAudit ) ;
307
- sinon
308
- . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
309
- . resolves ( 'recaptcha-response' ) ;
310
- mockRequest = { foo : 'bar' } ;
311
294
let callCount = 0 ;
312
295
mockActionMethod = sinon . stub ( ) . callsFake ( ( ) => {
313
296
callCount ++ ;
@@ -337,10 +320,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
337
320
sinon
338
321
. stub ( mockAuthInstance , '_getRecaptchaConfig' )
339
322
. returns ( recaptchaConfigAudit ) ;
340
- sinon
341
- . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
342
- . resolves ( 'recaptcha-response' ) ;
343
- mockRequest = { foo : 'bar' } ;
344
323
let callCount = 0 ;
345
324
mockActionMethod = sinon . stub ( ) . callsFake ( ( ) => {
346
325
callCount ++ ;
@@ -370,10 +349,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
370
349
sinon
371
350
. stub ( mockAuthInstance , '_getRecaptchaConfig' )
372
351
. returns ( recaptchaConfigAudit ) ;
373
- sinon
374
- . stub ( RecaptchaEnterpriseVerifier . prototype , 'verify' )
375
- . resolves ( 'recaptcha-response' ) ;
376
- mockRequest = { foo : 'bar' } ;
377
352
let callCount = 0 ;
378
353
mockActionMethod = sinon . stub ( ) . callsFake ( ( ) => {
379
354
callCount ++ ;
0 commit comments