summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/components/HistoryItemDisplay.test.tsx')
-rw-r--r--packages/cli/src/ui/components/HistoryItemDisplay.test.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
index b40b20bc..f806abd6 100644
--- a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
+++ b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
@@ -35,6 +35,18 @@ describe('<HistoryItemDisplay />', () => {
expect(lastFrame()).toContain('Hello');
});
+ it('renders UserMessage for "user" type with slash command', () => {
+ const item: HistoryItem = {
+ ...baseItem,
+ type: MessageType.USER,
+ text: '/theme',
+ };
+ const { lastFrame } = render(
+ <HistoryItemDisplay {...baseItem} item={item} />,
+ );
+ expect(lastFrame()).toContain('/theme');
+ });
+
it('renders StatsDisplay for "stats" type', () => {
const item: HistoryItem = {
...baseItem,