mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 23:20:12 -05:00
test: add tests for dataset document detail (#31274)
Co-authored-by: CodingOnStar <hanxujiang@dify.ai> Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
@@ -90,6 +90,14 @@ afterEach(async () => {
|
||||
// mock next/image to avoid width/height requirements for data URLs
|
||||
vi.mock('next/image')
|
||||
|
||||
// mock foxact/use-clipboard - not available in test environment
|
||||
vi.mock('foxact/use-clipboard', () => ({
|
||||
useClipboard: () => ({
|
||||
copy: vi.fn(),
|
||||
copied: false,
|
||||
}),
|
||||
}))
|
||||
|
||||
// mock zustand - auto-resets all stores after each test
|
||||
// Based on official Zustand testing guide: https://zustand.docs.pmnd.rs/guides/testing
|
||||
vi.mock('zustand')
|
||||
|
||||
Reference in New Issue
Block a user