Skip to content

Commit

Permalink
increase bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
yunakim714 committed Oct 2, 2024
1 parent fbabeb9 commit ca3e163
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
},
{
"path": "commerce-sdk-isomorphic-with-deps.tgz",
"maxSize": "430 kB"
"maxSize": "440 kB"
}
],
"proxy": "https://SHORTCODE.api.commercecloud.salesforce.com"
Expand Down
8 changes: 5 additions & 3 deletions src/static/helpers/slasHelper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ describe('Authorize user', () => {
nock(`https://${shortCode}.api.commercecloud.salesforce.com`)
.get(`/shopper/auth/v1/organizations/${organizationId}/oauth2/authorize`)
.query(true)
.reply((uri) => {
.reply(uri => {
const urlObject = new URL(
`https://${shortCode}.api.commercecloud.salesforce.com${uri}`
);
Expand Down Expand Up @@ -261,15 +261,17 @@ test('throws error on 400 response', async () => {
describe('Authorize IDP User', () => {
test('returns authorization url for 3rd party idp login', async () => {
const mockSlasClient = createMockSlasClient();
mockSlasClient.clientConfig.baseUri = 'https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}';
mockSlasClient.clientConfig.baseUri =
'https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}';

const authResponse = await slasHelper.authorizeIDP(
mockSlasClient,
parameters
);
const expectedAuthURL =
'https://short_code.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/organization_id/oauth2/authorize?client_id=client_id&channel_id=site_id&hint=hint&redirect_uri=redirect_uri&response_type=code&usid=usid';
expect(authResponse.url.replace(/[&?]code_challenge=[^&]*/, '')).toBe( expectedAuthURL
expect(authResponse.url.replace(/[&?]code_challenge=[^&]*/, '')).toBe(
expectedAuthURL
);
});
});
Expand Down

0 comments on commit ca3e163

Please sign in to comment.