Skip to content

Commit 1874faa

Browse files
author
renkelvin
committed
Update email.test.ts
1 parent 98162ad commit 1874faa

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/auth/src/core/credentials/email.test.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,9 @@ describe('core/credentials/email', () => {
197197
const stub = sinon.stub(recaptcha.enterprise, 'execute');
198198

199199
// First verification should fail with 'wrong-site-key'
200-
stub
201-
.withArgs('wrong-site-key', {
202-
action: RecaptchaActionName.SIGN_IN_WITH_PASSWORD
203-
})
204-
.rejects();
205200
// Second verifcation should succeed with site key refreshed
206-
stub
207-
.withArgs('site-key', {
208-
action: RecaptchaActionName.SIGN_IN_WITH_PASSWORD
209-
})
210-
.returns(Promise.resolve('recaptcha-response'));
201+
stub.onCall(0).rejects();
202+
stub.onCall(1).returns(Promise.resolve('recaptcha-response'));
211203

212204
mockEndpointWithParams(
213205
Endpoint.GET_RECAPTCHA_CONFIG,

0 commit comments

Comments
 (0)