Skip to content

Commit 12122b3

Browse files
summericyxiejay97
authored andcommitted
test(ui): add Tag test case
1 parent 0ee6d77 commit 12122b3

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { render } from '../../__tests__/utils';
2+
import { DTag } from './Tag';
3+
4+
describe('DTag', () => {
5+
it('renders without crashing', () => {
6+
const { container } = render(<DTag>Test Tag</DTag>);
7+
expect(container).toBeInTheDocument();
8+
});
9+
10+
it('renders children correctly', () => {
11+
const { getByText } = render(<DTag>Test Tag</DTag>);
12+
expect(getByText('Test Tag')).toBeInTheDocument();
13+
});
14+
15+
// If you still want to check for basic rendering based on props:
16+
it('renders with correct type', () => {
17+
render(<DTag dType="fill">Fill Tag</DTag>);
18+
// No expect() function here, assuming you only want to check if render() completes without error
19+
});
20+
21+
it('renders with correct theme', () => {
22+
render(<DTag dTheme="primary">Primary Tag</DTag>);
23+
// No expect() function here, assuming you only want to check if render() completes without error
24+
});
25+
26+
it('renders with correct size', () => {
27+
render(<DTag dSize="sm">Small Tag</DTag>);
28+
// No expect() function here, assuming you only want to check if render() completes without error
29+
});
30+
});

0 commit comments

Comments
 (0)