Skip to content

Commit

Permalink
feat: update warning in button component
Browse files Browse the repository at this point in the history
  • Loading branch information
Chisomchima authored and kabaros committed Mar 18, 2024
1 parent 0af2e94 commit 467077b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/button/src/button/__tests__/Button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ describe('<Button>', () => {
consoleSpy.mockRestore()
})

describe('warning for missing aria-label or title', () => {
it('No warning if children exist but aria-label or title is missing', () => {
describe('warning for missing aria-label and title', () => {
it('No warning if children exist but aria-label and title is missing', () => {
render(<Button>Children content</Button>)

expect(consoleSpy).not.toHaveBeenCalled()
})

it('does not warn if aria-label or title is present', () => {
it('does not warn if aria-label and title is present', () => {
render(
<Button ariaLabel="Test" title="Test">
<Button aria-label="Test" title="Test">
Children content
</Button>
)
Expand All @@ -41,7 +41,7 @@ describe('<Button>', () => {

it('No warning if there are no children but arial label and title', () => {
render(
<Button ariaLabel="Test" title="Test">
<Button aria-label="Test" title="Test">
{/* No children */}
</Button>
)
Expand Down

0 comments on commit 467077b

Please sign in to comment.