-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Update TypeScript example to show use of newer Jest types #10399
Conversation
yarn.lock
Outdated
jest-diff: ^25.2.1 | ||
pretty-format: ^25.2.1 |
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.
why are these on 25? 🤔
package.json
Outdated
@@ -16,7 +16,6 @@ | |||
"@types/babel__generator": "^7.0.0", | |||
"@types/babel__template": "^7.0.0", | |||
"@types/dedent": "0.7.0", | |||
"@types/jest": "24.0.2", |
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.
this is intentionally lower to make sure we don't pull in a version with dependencies - it causes "race" conditions when compiling since @types/jest
tries to load the types of jest-diff
which haven't been built yet.
Allowing the *
one to stay at 26 might work, not sure
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.
we might be able to fix it by having some sort of types
exclusion? not sure
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've just realised that the MockedFunction
type I wanted to show is actually in 24.9.0
. So I've added that back in and removed the 26.
@sheepsteak sorry about forgetting about this PR. I just landed #10732, so if your rebase this on master we should be good to land it 🙂 |
@SimenB, no problem! I've rebased on master. I was able to remove my bump of |
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.
thanks!
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
There have been some updates to Jest's separate
@types/jest
(started here I think - DefinitelyTyped/DefinitelyTyped#37173) that are very useful and I thought I'd update the TypeScript example to show how they can be used.- [x] Remove@types/jest
from rootpackage.json
(not needed I think and child packages state@types/jest: "*"
anyway- [x] Update@types/jest
inyarn.lock
to 24.9.0 that includesMockedFunction
andMockedClass
Test plan