-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { render } from '../../__tests__/utils'; | ||
import { DTag } from './Tag'; | ||
|
||
describe('DTag', () => { | ||
it('renders without crashing', () => { | ||
const { container } = render(<DTag>Test Tag</DTag>); | ||
expect(container).toBeInTheDocument(); | ||
}); | ||
|
||
it('renders children correctly', () => { | ||
const { getByText } = render(<DTag>Test Tag</DTag>); | ||
expect(getByText('Test Tag')).toBeInTheDocument(); | ||
}); | ||
|
||
// If you still want to check for basic rendering based on props: | ||
it('renders with correct type', () => { | ||
render(<DTag dType="fill">Fill Tag</DTag>); | ||
// No expect() function here, assuming you only want to check if render() completes without error | ||
}); | ||
|
||
it('renders with correct theme', () => { | ||
render(<DTag dTheme="primary">Primary Tag</DTag>); | ||
// No expect() function here, assuming you only want to check if render() completes without error | ||
}); | ||
|
||
it('renders with correct size', () => { | ||
render(<DTag dSize="sm">Small Tag</DTag>); | ||
// No expect() function here, assuming you only want to check if render() completes without error | ||
}); | ||
}); |