mirror of
https://github.com/langgenius/dify.git
synced 2026-04-21 03:07:39 +08:00
- Add tests for api-access/index.tsx (100% coverage) - Enhance tests for operations.tsx (95.65% coverage) - Enhance tests for status-item/index.tsx (93.75% coverage) - Add tests for simple components: chunk, loading, preview, statistics, empty-folder, no-linked-apps-panel, api/index - Remove tests for complex component retrieval-param-config - Test operations: archive, unarchive, enable, disable, sync, pause, resume, delete, download, rename - Test switch toggles with debounce handling - Test error notifications and success callbacks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
533 B
TypeScript
22 lines
533 B
TypeScript
import { cleanup, render } from '@testing-library/react'
|
|
import { afterEach, describe, expect, it } from 'vitest'
|
|
import DatasetsLoading from './loading'
|
|
|
|
afterEach(() => {
|
|
cleanup()
|
|
})
|
|
|
|
describe('DatasetsLoading', () => {
|
|
it('should render null', () => {
|
|
const { container } = render(<DatasetsLoading />)
|
|
expect(container.firstChild).toBeNull()
|
|
})
|
|
|
|
it('should not throw on multiple renders', () => {
|
|
expect(() => {
|
|
render(<DatasetsLoading />)
|
|
render(<DatasetsLoading />)
|
|
}).not.toThrow()
|
|
})
|
|
})
|