-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHECKOUT SDK][CHECKOUT WIDGETS][CM-896]feat: Load latest compatible …
…Widgets bundle (#2217)
- Loading branch information
1 parent
2d6704d
commit c253fe9
Showing
8 changed files
with
263 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ describe('load', () => { | |
const scriptId = 'immutable-checkout-widgets-bundle'; | ||
|
||
beforeEach(() => { | ||
jest.spyOn(console, 'warn').mockImplementation(() => {}); | ||
jest.spyOn(console, 'warn').mockImplementation(() => { }); | ||
}); | ||
|
||
describe('load unresolved bundle', () => { | ||
|
@@ -24,17 +24,13 @@ describe('load', () => { | |
|
||
describe('get widgets esm url', () => { | ||
it('should validate the versioning', () => { | ||
expect(getWidgetsEsmUrl()).toEqual( | ||
expect(getWidgetsEsmUrl(SDK_VERSION)).toEqual( | ||
`https://cdn.jsdelivr.net/npm/@imtbl/sdk@${SDK_VERSION}/dist/browser/checkout/widgets-esm.js`, | ||
); | ||
}); | ||
|
||
it('should change version', () => { | ||
expect(getWidgetsEsmUrl({ | ||
major: 1, | ||
minor: 2, | ||
patch: 3, | ||
})).toEqual( | ||
expect(getWidgetsEsmUrl('1.2.3')).toEqual( | ||
'https://cdn.jsdelivr.net/npm/@imtbl/[email protected]/dist/browser/checkout/widgets-esm.js', | ||
); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.