-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(projectcard): make numberAriaLabel optional but warn
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 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 |
---|---|---|
@@ -1,6 +1,17 @@ | ||
import { generateSnapshots } from '@chanzuckerberg/story-utils'; | ||
import { render } from '@testing-library/react'; | ||
import React from 'react'; | ||
import { ProjectCard } from './ProjectCard'; | ||
import * as stories from './ProjectCard.stories'; | ||
|
||
describe('<ProjectCard />', () => { | ||
generateSnapshots(stories); | ||
|
||
it('should warn if number is passed without numberAriaLabel', () => { | ||
expect(() => { | ||
render(<ProjectCard number={1} />); | ||
}).toThrow( | ||
/You must provide a "numberAriaLabel" for the number icon if a "number" has been passed/, | ||
); | ||
}); | ||
}); |
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