-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: bump 'expect' dev dep from v26 to v27 #8718
Conversation
FYI I ran tests locally (with local fix to A)
B) C) Error was:
None of these test failures appear to be related to the changes in this PR. |
Alternate fix, shown in 7e26ebb: add This doesn't seem like an ideal solution, but it decouples this PR from jestjs/jest#11816, which is nice. Edit: No dice, see update below. |
Turns out extending
... So I reverted those changes. |
Looking for someone who knows the @pavelfeldman, @dgozman, @aslushnikov, @yury-s, @JoelEinbinder, @mxschmitt |
079396e
to
1be2db9
Compare
@@ -9,5 +9,6 @@ | |||
"strictBindCallApply": true, | |||
"allowSyntheticDefaultImports": true, | |||
}, | |||
"include": ["**/*.spec.js", "**/*.ts", "index.d.ts"] | |||
"include": ["**/*.spec.js", "**/*.ts", "index.d.ts"], |
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.
note: had to be changed because otherwise the stable-test-runner dogfood globals conflicted with the ToT test-runner globals (tests/playwright-test/entry). e.g.:
$ tsc -p . -p ./tests/
types/testExpect.d.ts:42:22 - error TS2320: Interface 'Matchers<R>' cannot simultaneously extend types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>'.
Named property 'toThrow' of types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>' are not identical.
42 export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenExpectProperties1> {
~~~~~~~~
types/testExpect.d.ts:42:22 - error TS2320: Interface 'Matchers<R>' cannot simultaneously extend types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>'.
Named property 'toThrowError' of types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>' are not identical.
42 export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenExpectProperties1> {
~~~~~~~~
Found 2 errors.
error Command failed with exit code 2.
Thank you @mrienstra for your initiative! |
Motivation: jestjs/jest#11640
This change causes
npm test
to fail, because of a problem when runningnpm run check-deps
, which runsutils/check_deps.js
.More specifically, the function
allowExternalImport
/alllowExternalImport
(inutils/check_deps.js
) -- which was very recently added in #8501 -- is failing, when looking at the usage of theexpect
dev dep.I played around a little with
node_modules/expect/package.json
locally to see what kinds of changes would resolve this.Looks like removing the
"exports"
section does the trick (it was added in jestjs/jest#9921), but that's not much of a solution.Adding:
... Also does the job, but is presumably unnecessarily specific.
Adding:
... Is probably the right solution.
(Bonus: this would also allow removing this existing line:
"./build/utils": "./build/utils.js",
)Opened a PR to make this change: jestjs/jest#11816
Just in case there is a better path forward, opening this draft PR to allow conversation to take place both here and in the
jest
PR. @mxschmitt, @pavelfeldman, thoughts?