forked from RocketChat/fuselage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(fuselage):
Toastbar
a11y (RocketChat#1130)
- Loading branch information
1 parent
ab73172
commit 10faaf9
Showing
4 changed files
with
139 additions
and
38 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
10 changes: 10 additions & 0 deletions
10
packages/fuselage/src/components/ToastBar/ToastBar.spec.tsx
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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import { render } from '@testing-library/react'; | ||
import { axe, toHaveNoViolations } from 'jest-axe'; | ||
import React from 'react'; | ||
|
||
import { ToastBar } from '.'; | ||
|
||
expect.extend(toHaveNoViolations); | ||
|
||
describe('[ToastBar Component]', () => { | ||
it('renders without crashing', () => { | ||
render(<ToastBar />); | ||
}); | ||
|
||
it('should have no a11y violations', async () => { | ||
const { container } = render(<ToastBar />); | ||
|
||
const results = await axe(container); | ||
expect(results).toHaveNoViolations(); | ||
}); | ||
}); |
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
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