Skip to content

Commit de0a95e

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
test(chat): mock EMCN exports explicitly
1 parent cbbb28d commit de0a95e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/sim/app/(interfaces)/chat/components/message/message.test.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@ import { act } from 'react'
55
import { createRoot, type Root } from 'react-dom/client'
66
import { afterEach, describe, expect, it, vi } from 'vitest'
77

8-
vi.mock('@sim/emcn', async (importOriginal) => ({
9-
...(await importOriginal<typeof import('@sim/emcn')>()),
8+
vi.mock('@sim/emcn', () => ({
109
Button: ({ children, ...props }: { children?: React.ReactNode; [key: string]: unknown }) => (
1110
<button type='button' {...props}>
1211
{children}
1312
</button>
1413
),
14+
Check: () => null,
1515
Duplicate: () => null,
16+
ShimmerText: ({ children }: { children?: React.ReactNode }) => <span>{children}</span>,
1617
Tooltip: {
1718
Provider: ({ children }: { children?: React.ReactNode }) => <>{children}</>,
1819
Root: ({ children }: { children?: React.ReactNode }) => <>{children}</>,
1920
Trigger: ({ children }: { children?: React.ReactNode }) => <>{children}</>,
2021
Content: ({ children }: { children?: React.ReactNode }) => <>{children}</>,
2122
},
2223
cn: (...args: unknown[]) => args.filter(Boolean).join(' '),
24+
handleKeyboardActivation: vi.fn(),
2325
}))
2426

2527
vi.mock('@/app/(interfaces)/chat/components/message/components/file-download', () => ({

0 commit comments

Comments
 (0)