-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): remove @aws-amplify/core devDep from react-core (#5853)
- Loading branch information
1 parent
8b4a28b
commit 87d74a7
Showing
10 changed files
with
25 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@aws-amplify/ui-react-core": patch | ||
"@aws-amplify/ui-react-liveness": patch | ||
"@aws-amplify/ui-react-storage": patch | ||
"@aws-amplify/ui-react": patch | ||
"@aws-amplify/ui": patch | ||
"@aws-amplify/ui-vue": patch | ||
--- | ||
|
||
fix(deps): remove @aws-amplify/core devDep from react-core |
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
20 changes: 8 additions & 12 deletions
20
packages/react-core/src/hooks/__tests__/useSetUserAgent.test.ts
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 |
---|---|---|
@@ -1,26 +1,22 @@ | ||
import * as UserAgentModule from '@aws-amplify/core/internals/utils'; | ||
import { SetUserAgentOptions } from '@aws-amplify/ui/src/utils/setUserAgent/setUserAgent'; | ||
import { renderHook } from '@testing-library/react-hooks'; | ||
|
||
import * as UserAgentModule from '@aws-amplify/ui'; | ||
|
||
import useSetUserAgent from '../useSetUserAgent'; | ||
|
||
describe('useSetUserAgent', () => { | ||
const setCustomUserAgentSpy = jest.spyOn( | ||
UserAgentModule, | ||
'setCustomUserAgent' | ||
); | ||
|
||
beforeEach(() => { | ||
setCustomUserAgentSpy.mockReset(); | ||
}); | ||
|
||
it('should call setUserAgent when component mounts', () => { | ||
const details: SetUserAgentOptions = { | ||
const setCustomUserAgentSpy = jest.spyOn(UserAgentModule, 'setUserAgent'); | ||
|
||
const details: UserAgentModule.SetUserAgentOptions = { | ||
componentName: 'Authenticator', | ||
packageName: 'vue', | ||
version: '1.0.0', | ||
}; | ||
|
||
renderHook(() => useSetUserAgent(details)); | ||
|
||
expect(setCustomUserAgentSpy).toHaveBeenCalledTimes(1); | ||
expect(setCustomUserAgentSpy).toHaveBeenCalledWith(details); | ||
}); | ||
}); |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.