-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
chore: Upgrade Jest #12607
chore: Upgrade Jest #12607
Conversation
4038aa6
to
37a5b73
Compare
37a5b73
to
8351ed9
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.
I have some comments below. But also, are "diagnostics" (type checks) "on" by default now?
packages/api-graphql/__tests__/AWSAppSyncRealTimeProvider.test.ts
Outdated
Show resolved
Hide resolved
...e/__tests__/custom-pk-typings/model-init-mutable-model-typings/composite-identifier.test.tsx
Show resolved
Hide resolved
...tore/__tests__/custom-pk-typings/model-init-mutable-model-typings/custom-identifier.test.tsx
Show resolved
Hide resolved
..._/custom-pk-typings/model-init-mutable-model-typings/legacy-backwards-compatibility.test.tsx
Show resolved
Hide resolved
...ore/__tests__/custom-pk-typings/model-init-mutable-model-typings/managed-identifier.test.tsx
Show resolved
Hide resolved
...__/custom-pk-typings/model-init-mutable-model-typings/optionally-managed-identifier.test.tsx
Show resolved
Hide resolved
I believe it is on by default yes. I tried to leave much to the default settings but may be unaware of some issues that I didn't experience first hand - is there an issue with 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.
I'm still working on this PR but post some early comments. Overall it looks great! Thank you @cshfang
packages/api-graphql/__tests__/AWSAppSyncRealTimeProvider.test.ts
Outdated
Show resolved
Hide resolved
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.
I think I have covered most of the categories, I only have a fiew more questions.
packages/storage/__tests__/providers/s3/utils/client/S3/cases/listObjectsV2.ts
Show resolved
Hide resolved
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.
🚀🚀🚀
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.
Most of this change looks really straightforward. Some of the auth mock rework introduces enough diff that it would be hard to tease out logic difference.
The real test is, "are the tests passing?", followed by "did we drop coverage?". I've done enough review to satisfy myself that the upgrade is more valuable than the risks. I think I made a single comment about coverage, maybe there are more that I missed.
Good work fighting this one through. It'll be good to get back to current with jest. Thank you.
packages/storage/__tests__/providers/s3/utils/client/S3/cases/getObject.ts
Show resolved
Hide resolved
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.
Looks good
thanks @cshfang 🎖️
Sorry for the delay on response. No issue. "On" is definitely what we want. Thanks! |
Description of changes
This PR
ts-jest
package.json
files into configuration files which extend from a singular base configuration at the root of the monorepoasync/await
anddone
- which is an anti-pattern and no longer even allowed by newer versions of Jestexports
in their respective packages (mainly the fetch handler from internal utils) - as Jest now respects theexports
propertyyarn test
) as it is starting to run against memory issuestoBeCalled
) which have been marked as deprecated aliasesDescription of how you validated changes
yarn test
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.