Files
dify/web/app/components/share/text-generation/no-data/index.spec.tsx
2025-12-12 16:01:58 +08:00

22 lines
555 B
TypeScript

import React from 'react'
import { render, screen } from '@testing-library/react'
import NoData from './index'
jest.mock('react-i18next', () => ({
useTranslation: () => ({
t: (key: string) => key,
}),
}))
describe('NoData', () => {
beforeEach(() => {
jest.clearAllMocks()
})
it('should render empty state icon and text when mounted', () => {
const { container } = render(<NoData />)
expect(container.querySelector('svg')).toBeInTheDocument()
expect(screen.getByText('share.generation.noData')).toBeInTheDocument()
})
})