-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Open
Labels
Description
Version
30.0.5
Steps to reproduce
Run any test in jest 30 with a describe.skip
wrapping a it.concurrent
:
describe.skip('My test', () => {
it.concurrent('Should pass', async () => {
await new Promise((resolve) => setTimeout(resolve, 1000));
expect(true);
})
})
You can open this sandbox and run yarn jest script.test.js
:
https://codesandbox.io/p/devbox/zkkysw
Expected behavior
I expect the describe.skip
to skip the whole block without failing
Actual behavior
The test fails in all cases (even if the block should be passing), and I get this error:
TypeError: Cannot read properties of undefined (reading 'then')
at _runTestsForDescribeBlock (node_modules/jest-circus/build/jestAdapterInit.js:837:45)
Additional context
If we unskip the describe
block, the test passes as expected. It only fails when we skip it
Environment
System:
OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
CPU: (2) x64 AMD EPYC
Binaries:
Node: 20.12.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.5.0 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/share/npm-global/bin/pnpm
npmPackages:
jest: ^30.0.5 => 30.0.5
yoannmoinet and F1r3w477