-
Notifications
You must be signed in to change notification settings - Fork 97
chore: add export testing to all packages #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jzempel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along with the common code abstraction, consider whether it makes sense to remove the associated PR checklist item from https://github.com/zendeskgarden/react-components/blob/master/.github/PULL_REQUEST_TEMPLATE.md
I've removed this checklist item and also added a new |
|
|
||
| const mappedFiles = fileMapper(files); | ||
|
|
||
| expect(keys).toEqual(mappedFiles); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we really have the expect hidden away in another module? Can we have this method just return mapped files and then in each test we do the expect there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #228
Description
This PR adds root export testing to all packages. This is to help reduce incidents where we forget to add a new component/utility to the root export. Similar to #211
Detail
These tests use a
globutility to help with finding the components. Since each package is unique it was difficult to add with the standardreaddirnode methods.A few of the packages (loaders/tooltips) needed some custom logic to match the expected exports, but overall the method is consistent.