File tree Expand file tree Collapse file tree
packages/ui/src/components/tag Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ } ) ;
You can’t perform that action at this time.
0 commit comments