-
-
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
fix(jest-jasmine2, jest-types): remove jasmine
types from @jest/types
#12125
Conversation
// TODO: Get rid of this at some point | ||
type Jasmine = { | ||
_DEFAULT_TIMEOUT_INTERVAL?: number; | ||
addMatchers: (matchers: Record<string, unknown>) => void; |
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.
addMatchers
implementation was removed in #9853
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 addMatchers
still exist on jasmine
?
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.
Here I had in mind Jest globals. It was removed from Jest globals, but Jasmin types still have addMatchers
here: https://github.com/facebook/jest/blob/0d0844a249a179197e82bd1ea097a4cb6dad9f32/packages/jest-jasmine2/src/types.ts#L91
jasmine
types from @jest/types
jasmine
types from @jest/types
Codecov Report
@@ Coverage Diff @@
## main #12125 +/- ##
=======================================
Coverage 68.46% 68.47%
=======================================
Files 324 324
Lines 16961 16959 -2
Branches 5055 5055
=======================================
Hits 11612 11612
+ Misses 5317 5315 -2
Partials 32 32
Continue to review full report at Codecov.
|
@SimenB This one is rebased as well. |
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!
declare module '@jest/types' { | ||
namespace Global { | ||
interface GlobalAdditions { | ||
jasmine: Jasmine; |
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.
What about pending
etc?
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.
Copied them all here for completeness. They were not necessary internally, but might be useful for something else.
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.
great stuff, 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
Following up #12124
The change in the above mentioned PR would allow to move all
jasmine
specific types from@jest/types
to its own package. If I got it right, sincejest-circus
is the default test runner these types do not belong in theGlobal
interface.Test plan
Code did not change.