Skip to content

Commit ae619b0

Browse files
committed
Cleanup tests
1 parent 14ef5dd commit ae619b0

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

packages/auth/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.test.ts

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,11 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
173173

174174
beforeEach(async () => {
175175
mockAuthInstance = await testAuth();
176-
mockRequest = {};
176+
mockRequest = { foo: 'bar' };
177177
mockActionMethod = sinon.stub();
178+
sinon
179+
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
180+
.resolves('recaptcha-response');
178181
});
179182

180183
afterEach(() => {
@@ -188,10 +191,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
188191
sinon
189192
.stub(mockAuthInstance, '_getRecaptchaConfig')
190193
.returns(recaptchaConfigEnforce);
191-
sinon
192-
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
193-
.resolves('recaptcha-response');
194-
mockRequest = { foo: 'bar' };
195194
mockActionMethod = sinon.stub().resolves('testResponse');
196195
const response = await handleRecaptchaFlow(
197196
mockAuthInstance,
@@ -212,10 +211,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
212211
sinon
213212
.stub(mockAuthInstance, '_getRecaptchaConfig')
214213
.returns(recaptchaConfigOff);
215-
sinon
216-
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
217-
.resolves('recaptcha-response');
218-
mockRequest = { foo: 'bar' };
219214
let callCount = 0;
220215
mockActionMethod = sinon.stub().callsFake(() => {
221216
callCount++;
@@ -245,10 +240,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
245240
sinon
246241
.stub(mockAuthInstance, '_getRecaptchaConfig')
247242
.returns(recaptchaConfigOff);
248-
sinon
249-
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
250-
.resolves('recaptcha-response');
251-
mockRequest = { foo: 'bar' };
252243
let callCount = 0;
253244
mockActionMethod = sinon.stub().callsFake(() => {
254245
callCount++;
@@ -281,10 +272,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
281272
sinon
282273
.stub(mockAuthInstance, '_getRecaptchaConfig')
283274
.returns(recaptchaConfigEnforce);
284-
sinon
285-
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
286-
.resolves('recaptcha-response');
287-
mockRequest = { foo: 'bar' };
288275
mockActionMethod = sinon.stub().resolves('testResponse');
289276
const response = await handleRecaptchaFlow(
290277
mockAuthInstance,
@@ -304,10 +291,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
304291
sinon
305292
.stub(mockAuthInstance, '_getRecaptchaConfig')
306293
.returns(recaptchaConfigAudit);
307-
sinon
308-
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
309-
.resolves('recaptcha-response');
310-
mockRequest = { foo: 'bar' };
311294
let callCount = 0;
312295
mockActionMethod = sinon.stub().callsFake(() => {
313296
callCount++;
@@ -337,10 +320,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
337320
sinon
338321
.stub(mockAuthInstance, '_getRecaptchaConfig')
339322
.returns(recaptchaConfigAudit);
340-
sinon
341-
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
342-
.resolves('recaptcha-response');
343-
mockRequest = { foo: 'bar' };
344323
let callCount = 0;
345324
mockActionMethod = sinon.stub().callsFake(() => {
346325
callCount++;
@@ -370,10 +349,6 @@ describe('platform_browser/recaptcha/recaptcha_enterprise_verifier', () => {
370349
sinon
371350
.stub(mockAuthInstance, '_getRecaptchaConfig')
372351
.returns(recaptchaConfigAudit);
373-
sinon
374-
.stub(RecaptchaEnterpriseVerifier.prototype, 'verify')
375-
.resolves('recaptcha-response');
376-
mockRequest = { foo: 'bar' };
377352
let callCount = 0;
378353
mockActionMethod = sinon.stub().callsFake(() => {
379354
callCount++;

0 commit comments

Comments
 (0)