-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix Jest integration tests #4824
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
Fix Jest integration tests #4824
Conversation
It's now downloaded to node_modules/.cache so it's covered by the node_modules cache
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.
Just a couple question, but looks good. Tests are passing in CI. 🎉
| afterAll(async () => { | ||
| await testApp.collections.Shops.remove({ _id: internalShopId }); | ||
| await testApp.collections.Catalog.remove({ _id: internalCatalogItemId }); | ||
| await Promise.all(internalTagIds.map((_id) => testApp.collections.Tags.remove({ _id }))); |
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.
Is this map just to loop through and remove all the tags?
| context: { | ||
| appEvents, | ||
| collections: this.collections, | ||
| getFunctionsOfType: () => [], |
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.
Is this a required property for context now?
Resolves #4752
Impact: minor
Type: test
Issue
Many Jest integration tests were not working
Solution
Update to latest Jest and fix issues with the tests.
Also re-enabled running the Jest integration tests as a CI check, and that seems to be working now! 🤞
Breaking changes
None
Testing
test.skipanymore (except a few that were never written but were defined. Latest Jest now requires that you change those totest.skipwith a no-op function, which there is still some controversy around.)npm run test:integrationlocally and verify that all tests pass.