mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 20:44:42 +08:00
Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
636 B
TypeScript
26 lines
636 B
TypeScript
import { cleanup, render } from '@testing-library/react'
|
|
import { afterEach, describe, expect, it } from 'vitest'
|
|
import DatasetPreview from './index'
|
|
|
|
afterEach(() => {
|
|
cleanup()
|
|
})
|
|
|
|
describe('DatasetPreview', () => {
|
|
it('should render null', () => {
|
|
const { container } = render(<DatasetPreview />)
|
|
expect(container.firstChild).toBeNull()
|
|
})
|
|
|
|
it('should be a valid function component', () => {
|
|
expect(typeof DatasetPreview).toBe('function')
|
|
})
|
|
|
|
it('should not throw on multiple renders', () => {
|
|
expect(() => {
|
|
render(<DatasetPreview />)
|
|
render(<DatasetPreview />)
|
|
}).not.toThrow()
|
|
})
|
|
})
|