-
Notifications
You must be signed in to change notification settings - Fork 15
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
test: add test script to each component's package.json file #687
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
a25d519
to
020e5c1
Compare
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.
Nice.
Would have been nifty if we could have passed in e.g. d2-app-scripts test --jest-config ../../jest.config.js
and re-used the Jest and Enzyme configuration (the --config
flag is taken). That can be a future thing.
I've implemented the Unfortunately we can't reuse the top level module.exports = {
setupFilesAfterEnv: [`${__dirname}/jest.enzyme.config.js`],
testPathIgnorePatterns: [
'/node_modules/',
'/build/',
'/.d2/',
],
} I'm happy to update this PR once dhis2/app-platform#605 is merged. |
@@ -0,0 +1,4 @@ | |||
module.exports = { | |||
setupFilesAfterEnv: [`${__dirname}/jest.enzyme.config.js`], |
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.
Neato !
Adds a test script to each component's
package.json
file, allowing us to runyarn test
for individual components.Also adds jest enzyme config for components whose tests use enzyme.