Skip to content
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

Support Jest 28 #796

Closed
davidglezz opened this issue May 2, 2022 · 1 comment · Fixed by #801
Closed

Support Jest 28 #796

davidglezz opened this issue May 2, 2022 · 1 comment · Fixed by #801
Labels
enhancement New feature or request

Comments

@davidglezz
Copy link

davidglezz commented May 2, 2022

Describe the bug
After upgrade to Jest 28 I get:

TypeError: Cannot read properties of undefined (reading 'serial')
    at PlaywrightRunner.runTests (/.../node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:127:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async TestScheduler.scheduleTests (/.../node_modules/@jest/core/build/TestScheduler.js:317:13)
    at async runJest (/.../node_modules/@jest/core/build/runJest.js:407:19)
    at async _run10000 (/.../node_modules/@jest/core/build/cli/index.js:338:7)
    at async runCLI (/.../node_modules/@jest/core/build/cli/index.js:190:3)
    at async Object.run (/.../node_modules/jest-cli/build/cli/index.js:155:37)

To Reproduce
Steps to reproduce the behavior:

  • Use Jest 28 with this preset.

Expected behavior
That jest-playwright support Jest 28 and that it does not fail.

Screenshots
Not applicable.

Desktop (please complete the following information):

  • OS: macOS
  • Playwright version 1.21.0
  • jest-playwright version 1.7.0
  • jest 28

Jest configuration (Either in the package.json > jest or in the jest.config.js):

<enter your Jest config here>

Additional context
Add any other context about the problem here.

@davidglezz davidglezz reopened this May 3, 2022
mmichaelis added a commit to CoreMedia/ckeditor-plugins that referenced this issue May 16, 2022
Tried to update Jest Playwright to Jest 28 but failed
due to playwright-community/jest-playwright#796.

Instead of updating to Jest 28, rolled back to Jest 27
for Playwright tests for now.

Commit also contains an update to Jest 28.1.0, which
was one of the trials to possibly get rid of the issue.
mmichaelis added a commit to CoreMedia/ckeditor-plugins that referenced this issue May 19, 2022
Also keeping reference to `babel-jest` for version 27 as a left-over
from previous results to debug failed module-resolution because
of typo in tsconfig.json. It seems to make sense, to keep this in
sync with "rolled back to Jest 27" to work around
playwright-community/jest-playwright#796
@mxschmitt mxschmitt added the enhancement New feature or request label May 25, 2022
mmichaelis added a commit to CoreMedia/ckeditor-plugins that referenced this issue Jun 3, 2022
While originally only stayed for Jest Playwright tests at 27.5.1
because of playwright-community/jest-playwright#796, it seems,
that pnpm (tested for version 7) fails (sometimes) to get
dependencies straight, when two different versions of a package
are in use.

We observed (on Windows, sometimes also on Linux), that mixing
Jest 28.x and 27.x in workspace sometimes caused Jest 28.x to
have transitive dependencies resolved to incompatible Jest 27.x
(like Jest 28.x with incompatible @jest/core 27.x) and vice
versa.

Downgrading to 27.5.1 also means, that we are again affected
by facebook/jest/issues#9771 (resolved for 28.x only), so that
we need to reintroduce the enhanced-resolve workaround for all
packages again (previously only active for Jest Playwright
tests in `itest/`.
@itayadler
Copy link

this issue still occurs with latest version v3.0.1 and latest jest v29.4.2, to fix it I went all the way back to playwright-community/jest-playwright#d7dd2fc7c348474d065526e696b922139fe5971c
as it doesn't have this commit the chore: bump dependencies commit which causes the issue I think.
which I think causes the issue, WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants