-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ai): update exported types, add exports snapshot test (#5768)
* chore(ai): update exported types, add exports snapshot test * Update packages/react-ai/src/index.ts Co-authored-by: Caleb Pollman <cpollman@amazon.com> * chore: update package name in exports test * update lint config to include exports.ts * fix build issue * fix build issue --------- Co-authored-by: Caleb Pollman <cpollman@amazon.com>
- Loading branch information
1 parent
43e78b1
commit 2aa639d
Showing
4 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
packages/react-ai/src/__tests__/__snapshots__/exports.test.ts.snap
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 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`@aws-amplify/ui-react-ai exports should match snapshot 1`] = ` | ||
[ | ||
"AIContextProvider", | ||
"AIConversation", | ||
"createAIConversation", | ||
"createAIHooks", | ||
] | ||
`; |
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,11 @@ | ||
import * as exported from '..'; | ||
|
||
describe('@aws-amplify/ui-react-ai', () => { | ||
describe('exports', () => { | ||
it('should match snapshot', () => { | ||
const sortedExports = Object.keys(exported).sort(); | ||
|
||
expect(sortedExports).toMatchSnapshot(); | ||
}); | ||
}); | ||
}); |
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,3 +1,17 @@ | ||
import { createAIConversation } from './createAIConversation'; | ||
import { AIConversation } from './AIConversation'; | ||
export { createAIConversation, AIConversation }; | ||
import { | ||
Avatars, | ||
CustomAction, | ||
ResponseComponent, | ||
SuggestedPrompt, | ||
} from './types'; | ||
|
||
export { | ||
createAIConversation, | ||
AIConversation, | ||
Avatars, | ||
CustomAction, | ||
ResponseComponent, | ||
SuggestedPrompt, | ||
}; |
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,8 +1,15 @@ | ||
import { createAIConversation, AIConversation } from './components'; | ||
import { createAIHooks, AIContextProvider } from './hooks'; | ||
export { | ||
createAIConversation, | ||
createAIHooks, | ||
AIContextProvider, | ||
AIConversation, | ||
}; | ||
Avatars, | ||
CustomAction, | ||
ResponseComponent, | ||
SuggestedPrompt, | ||
} from './components'; | ||
export { createAIHooks, AIContextProvider } from './hooks'; | ||
export { | ||
ConversationMessage, | ||
ConversationMessageContent, | ||
SendMessage, | ||
SendMesageParameters, | ||
} from './types'; |