Skip to content

Commit

Permalink
Update passwordless test and snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
TSLarson committed Oct 31, 2024
1 parent 21e636a commit 59b50aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ exports[`passwordless connection initPasswordless() calls initNS with showTerms
`;

exports[`passwordless connection initPasswordless() should call webAPI.getUserCountry when there is no default location 1`] = `
[
undefined,
"passwordlessCaptcha",
{
"successFn": undefined,
"syncFn": [Function],
},
]
`;

exports[`passwordless connection initPasswordless() should call webAPI.getUserCountry when there is no default location 2`] = `
[
undefined,
"location",
Expand All @@ -100,14 +111,14 @@ exports[`passwordless connection initPasswordless() should call webAPI.getUserCo
]
`;

exports[`passwordless connection initPasswordless() should call webAPI.getUserCountry when there is no default location 2`] = `
exports[`passwordless connection initPasswordless() should call webAPI.getUserCountry when there is no default location 3`] = `
[
"id",
"cb",
]
`;

exports[`passwordless connection initPasswordless() should call webAPI.getUserCountry when there is no default location 3`] = `
exports[`passwordless connection initPasswordless() should call webAPI.getUserCountry when there is no default location 4`] = `
[
"model",
"en",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/connection/passwordless/passwordless.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ describe('passwordless connection', () => {
it('should call webAPI.getUserCountry when there is no default location', () => {
initPasswordless(null, {});
const sync = require('sync');
expectMockToMatch(sync, 1);
expectMockToMatch(sync, 2);

const { syncFn, successFn } = sync.mock.calls[0][2];
const { syncFn, successFn } = sync.mock.calls[1][2];
syncFn(null, 'cb');
expectMockToMatch(require('core/web_api').getUserCountry, 1);

Expand Down

0 comments on commit 59b50aa

Please sign in to comment.