{"id":"68d7898c8d3d2fc5","repo":"jestjs/jest","slug":"jest-failing-tests-are-only-supported-in-jest-68d789","errorCode":null,"errorMessage":"Jest: `failing` tests are only supported in `jest-circus`.","messagePattern":"Jest: `failing` tests are only supported in `jest-circus`\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/jest-jasmine2/src/jasmineAsyncInstall.ts","lineNumber":237,"sourceCode":"        }\n        throw new Error(\n          `Jest: concurrent test \"${spec.getFullName()}\" must return a Promise.`,\n        );\n      });\n    } catch (error) {\n      promise = Promise.reject(error);\n    }\n    // Avoid triggering the uncaught promise rejection handler in case the test errors before\n    // being awaited on.\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    promise.catch(() => {});\n\n    return spec;\n  };\n\n  // eslint-disable-next-line unicorn/consistent-function-scoping\n  const failing = () => {\n    throw new Error(\n      'Jest: `failing` tests are only supported in `jest-circus`.',\n    );\n  };\n\n  failing.each = () => {\n    throw new Error(\n      'Jest: `failing` tests are only supported in `jest-circus`.',\n    );\n  };\n  // each is bound after the function is made concurrent, so for now it is made noop\n  // eslint-disable-next-line @typescript-eslint/no-empty-function,unicorn/consistent-function-scoping\n  concurrentFn.each = () => () => {};\n  concurrentFn.failing = failing;\n\n  return concurrentFn;\n}\n\nexport default function jasmineAsyncInstall(","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/jestjs/jest/blob/f49721c78e195558b40913977c9230f5b7f559d8/packages/jest-jasmine2/src/jasmineAsyncInstall.ts#L219-L255","documentation":"Thrown by `concurrentFn.failing` in jasmineAsyncInstall.ts:237. `failing` is a jest-circus-only API for tests that are expected to fail; jasmine2 does not implement it, so invoking `it.concurrent.failing(...)` throws immediately at registration time.","triggerScenarios":"Calling `it.concurrent.failing('x', fn)` or `test.concurrent.failing(...)` in a project whose test runner is `jasmine2` (the default before Jest 27, or when `testRunner` points at `jasmine2`).","commonSituations":"Copying a test from a circus-based project into a jasmine2 project; Jest version downgrade; default runner still jasmine2 in an older config.","solutions":["Switch the project to jest-circus: set `testRunner: 'jest-circus'` in config (default in Jest 27+; upgrade if older).","If you must stay on jasmine2, remove the `.failing` call and invert the assertion manually instead."],"exampleFix":"// before (with jasmine2 runner)\nit.concurrent.failing('known bug', async () => { expect(buggy()).toBe(true); });\n// after\n// jest.config.js: testRunner: 'jest-circus'","handlingStrategy":"validation","validationCode":"const config = require('./jest.config');\nif (config.testRunner && !config.testRunner.includes('circus')) {\n  throw new Error('it.concurrent.failing requires jest-circus');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set `testRunner: 'jest-circus'` (default in Jest 27+) before using .failing.","Gate circus-only APIs behind a runner check in shared test helpers."],"tags":["jasmine2","concurrent","failing","jest-circus","config"],"analyzedSha":"f49721c78e195558b40913977c9230f5b7f559d8","analyzedAt":"2026-08-03T20:16:28.571Z","schemaVersion":2}