-
Notifications
You must be signed in to change notification settings - Fork 903
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
Track test coverage of JS packages in Coveralls #20911
Conversation
Take the Jest configuration out of the package json and into its own separate config file, where we export a JS object instead of having to use JSON. This allows us slightly more flexibility. We could add comments for example or use variables.
yarn test --coverage will generate json, lcov, text and clover by default. I only add text-summary to the list.
With -u, we simply accept the result of any change we make that changes the outcome of any of our snapshot tests. To spot issues easly, let the tests fail on failing snapshot tests, instead of noticing changes to snapshot files when you are ready to commit your changes.
This is consistent with all our other packages and makes for slightly faster test-runs.
Pull Request Test Coverage Report for Build 7272587514Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
313514e
to
41f95d4
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.
Awesome work! 🥳
Mainly some comments about further polishing of the configurations.
It seems that the moduleNameMapper
needs lodash-es
if yoastseo
is involved. And .css
is needed for @yoast/components
at least.
I'm not following why the transforms are not needed anymore when yoastseo
is still involved.
"transformIgnorePatterns": [ | ||
"/node_modules/(?!yoastseo|lodash-es).+\\.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.
Interesting, I would think the yoastseo
exception is still needed here, and therefor also the lodash-es
. But it works anyway with just the lodash-es
map you have kept 🤔
Do you have any insights on this?
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.
Very interesting indeed. I wasn't able figure out what exactly is going on, but it seems like babel-jest is picking up babelrc files from its linked dependencies regardless of transformIgnorePatterns. Or perhaps it being a link, makes the ignorePattern not match
Co-authored-by: Igor <[email protected]>
@diedexx Please be aware that following packages have been abandoned and are not actively maintained anymore:
Please consider using the other packages instead. |
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Relevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
yarn test
script for yoastseo, feature-flag and js.UI changes
Other environments
[shopify-seo]
, added test instructions for Shopify and attached theShopify
label to this PR.Documentation
Quality assurance
Innovation
innovation
label.