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.
addMatchers implementation was removed in #9853
There was a problem hiding this comment.
I think addMatchers still exist on jasmine?
There was a problem hiding this comment.
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/typesjasmine 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. |
| declare module '@jest/types' { | ||
| namespace Global { | ||
| interface GlobalAdditions { | ||
| jasmine: Jasmine; |
There was a problem hiding this comment.
Copied them all here for completeness. They were not necessary internally, but might be useful for something else.
|
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
jasminespecific types from@jest/typesto its own package. If I got it right, sincejest-circusis the default test runner these types do not belong in theGlobalinterface.Test plan
Code did not change.