Skip to content

ci: do not run hooks of skipped describe blocks on Jest 24 - #18575

Merged
JLHwung merged 1 commit into
babel:7.xfrom
JLHwung:ci-jest24-skip-pending-hooks
Nov 11, 2026
Merged

JLHwung merged 1 commit into
babel:7.xfrom
JLHwung:ci-jest24-skip-pending-hooks

Conversation

@JLHwung

@JLHwung JLHwung commented Nov 10, 2026

Copy link
Copy Markdown
Contributor
Q                       A
Fixed Issues? When there is one test failing, the Babel 7 Node.js 6 test ignores the conditional test and throws a lot of errors from codes that should not have run on Node.js 6
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
Need backport? No, this PR is for 7.x only.
License MIT

I believe we have been troubled by this issue for a few years, with the help of LLM we can finally resolve this.

The Node.js 6/8/10 jobs downgrade to Jest 24, whose jest-jasmine2 runs beforeAll/afterAll of a describe.skip block and attaches their errors to the skipped tests. This surfaced as noisy "errors" in passing suites, e.g. config-ts-integration-tsx and transform-script-tags.

Backport the Jest 25 check through a Yarn patch. The resolution does not match anything until the CI step runs yarn up jest@24.

Note: The resolution will only be picked up when we downgrade Jest to 24: In 7.x we use Jest 30 which does not depend on jest-jasmine2@npm:^24.9.0 so this patch is not activated for tests on Node.js 12 and above.

Assisted-by: Claude Opus 5.5

@JLHwung JLHwung added PR: Internal 🏠 A type of pull request used for our changelog categories 7.x: not on babel 8 labels Nov 10, 2026
@babel-bot

babel-bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/63150

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

commit: 958c545

The Node.js 6/8/10 jobs downgrade to Jest 24, whose jest-jasmine2 runs
beforeAll/afterAll of a describe.skip block and attaches their errors to
the skipped tests. This surfaced as noisy "errors" in passing suites, e.g.
config-ts-integration-tsx and transform-script-tags.

Backport the fix from jestjs/jest#9931 (released in Jest 25.5.4) through a
Yarn patch. The resolution does not match anything until the CI step runs
`yarn up jest@24`.

Assisted-by: Claude Opus 5.5
@JLHwung
JLHwung force-pushed the ci-jest24-skip-pending-hooks branch from b0802e8 to 958c545 Compare November 10, 2026 21:53
}

- return !node.disabled;
+ return !node.disabled && !node.markedPending;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a simplified backport of jestjs/jest#9931 to Jest 24.

@nicolo-ribaudo nicolo-ribaudo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh nice

@JLHwung
JLHwung added this pull request to the merge queue Nov 11, 2026
Merged via the queue into babel:7.x with commit 496be66 Nov 11, 2026
68 checks passed
@JLHwung
JLHwung deleted the ci-jest24-skip-pending-hooks branch November 11, 2026 16:48
@JLHwung

JLHwung commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

The patch works as expected, the Node.js 6 CI error in https://github.com/babel/babel/actions/runs/43078378269/job/130725133286?pr=18595 is now much more helpful:

Summary of all failing tests
FAIL packages/babel-plugin-transform-object-super/test/index.js
  ● babel-plugin-transform-object-super/transparent expr wrappers › ts exec

    SyntaxError: /home/runner/work/babel/babel/packages/babel-plugin-transform-object-super/test/fixtures/transparent-expr-wrappers/ts-exec/exec.ts: Unexpected token .
       1 | var _obj;
       2 | const proto = {
       3 |   m(...args) {
       4 |     return [this, ...args];
       5 |   }
       6 | };
       7 | const obj = _obj = {
       8 |   __proto__: proto,
       9 |   as() {
      10 |     return babelHelpers.superPropGet(_obj, "m", this, 2)([1]);
      11 |   },
      12 |   nonNull() {
      13 |     return babelHelpers.superPropGet(_obj, "m", this, 2)([1]);
      14 |   },
      15 |   satisfies() {
      16 |     return babelHelpers.superPropGet(_obj, "m", this, 2)([1]);
      17 |   },
      18 |   typeAssertion() {
      19 |     return babelHelpers.superPropGet(_obj, "m", this, 2)([1]);
      20 |   },
      21 |   nested() {
      22 |     return babelHelpers.superPropGet(_obj, "m", this, 2)([1]);
      23 |   },
      24 |   optional() {
      25 |     return babelHelpers.superPropGet(_obj, "m", this, 2)?.([1]);
      26 |   }
      27 | };
      28 | expect(obj.as()).toEqual([obj, 1]);
      29 | expect(obj.nonNull()).toEqual([obj, 1]);
      30 | expect(obj.satisfies()).toEqual([obj, 1]);
      31 | expect(obj.typeAssertion()).toEqual([obj, 1]);
      32 | expect(obj.nested()).toEqual([obj, 1]);
      33 | expect(obj.optional()).toEqual([obj, 1]);/home/runner/work/babel/babel/packages/babel-plugin-transform-object-super/test/fixtures/transparent-expr-wrappers/ts-exec/exec.ts:25
        return babelHelpers.superPropGet(_obj, "m", this, 2)?.([1]);
                                                             ^

    SyntaxError: Unexpected token .

      250 |     const src = `((function(exports, require, module, __filename, __dirname, opts) {\n${code}\n})).apply(global, global.__callArgs);`;
      251 |     context.__callArgs = [module.exports, req, module, filename, dirname, opts];
    > 252 |     return vm.runInContext(src, context, {
          |               ^
      253 |       filename,
      254 |       displayErrors: true,
      255 |       lineOffset: -1,

      at runCodeInTestContext (packages/babel-helper-transform-fixture-test-runner/src/index.ts:252:15)
      at packages/babel-helper-transform-fixture-test-runner/src/index.ts:339:20
      at asyncGeneratorStep (packages/babel-helper-transform-fixture-test-runner/src/index.ts:37:42)
      at _next (packages/babel-helper-transform-fixture-test-runner/src/index.ts:37:42)

FAIL packages/babel-plugin-transform-private-methods/test/index.js
  ● babel-plugin-transform-private-methods/transparent expr wrappers › ts exec

    SyntaxError: /home/runner/work/babel/babel/packages/babel-plugin-transform-private-methods/test/fixtures/transparent-expr-wrappers/ts-exec/exec.ts: Unexpected token .
       1 | var _C_brand = /*#__PURE__*/new WeakSet();
       2 | class C {
       3 |   constructor() {
       4 |     babelHelpers.classPrivateMethodInitSpec(this, _C_brand);
       5 |   }
       6 |   as() {
       7 |     return babelHelpers.assertClassBrand(_C_brand, this, _m).call(this, 1);
       8 |   }
       9 |   nonNull() {
      10 |     return babelHelpers.assertClassBrand(_C_brand, this, _m).call(this, 1);
      11 |   }
      12 |   optional() {
      13 |     return babelHelpers.assertClassBrand(_C_brand, this, _m)?.call(this, 1);
      14 |   }
      15 | }
      16 | function _m(...args) {
      17 |   return [this, ...args];
      18 | }
      19 | const c = new C();
      20 | expect(c.as()).toEqual([c, 1]);
      21 | expect(c.nonNull()).toEqual([c, 1]);
      22 | expect(c.optional()).toEqual([c, 1]);/home/runner/work/babel/babel/packages/babel-plugin-transform-private-methods/test/fixtures/transparent-expr-wrappers/ts-exec/exec.ts:13
        return babelHelpers.assertClassBrand(_C_brand, this, _m)?.call(this, 1);
                                                                 ^

    SyntaxError: Unexpected token .

      250 |     const src = `((function(exports, require, module, __filename, __dirname, opts) {\n${code}\n})).apply(global, global.__callArgs);`;
      251 |     context.__callArgs = [module.exports, req, module, filename, dirname, opts];
    > 252 |     return vm.runInContext(src, context, {
          |               ^
      253 |       filename,
      254 |       displayErrors: true,
      255 |       lineOffset: -1,

      at runCodeInTestContext (packages/babel-helper-transform-fixture-test-runner/src/index.ts:252:15)
      at packages/babel-helper-transform-fixture-test-runner/src/index.ts:339:20
      at asyncGeneratorStep (packages/babel-helper-transform-fixture-test-runner/src/index.ts:37:42)
      at _next (packages/babel-helper-transform-fixture-test-runner/src/index.ts:37:42)


Test Suites: 2 failed, 1 skipped, 253 passed, 255 of 256 total
Tests:       2 failed, 68 skipped, 2 todo, 33122 passed, 33194 total
Snapshots:   234 passed, 234 total
Time:        151.975s
Ran all test suites.

markharding pushed a commit to futo-org/Harbor that referenced this pull request Nov 17, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@babel/runtime](https://babel.dev/docs/en/next/babel-runtime) ([source](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime)) | [`7.29.13` → `7.29.14`](https://renovatebot.com/diffs/npm/@babel%2fruntime/7.29.13/7.29.14) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@babel%2fruntime/7.29.14?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@babel%2fruntime/7.29.13/7.29.14?slim=true) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/2097) for more information.

---

### Release Notes

<details>
<summary>babel/babel (@&#8203;babel/runtime)</summary>

### [`v7.29.14`](https://github.com/babel/babel/releases/tag/v7.29.14)

[Compare Source](babel/babel@v7.29.13...v7.29.14)

#### v7.29.14 (2026-11-11)

##### 👓 Spec Compliance

- `babel-parser`
  - [#&#8203;18543](babel/babel#18543) fix(parser): require `(` after `import.{source,defer,sync}` ([@&#8203;babel-bot](https://github.com/babel-bot))

##### 🐛 Bug Fix

- `babel-helper-module-transforms`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd`
  - [#&#8203;18597](babel/babel#18597) Respect `importInterop: none` for dynamic import ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helper-member-expression-to-functions`, `babel-plugin-transform-classes`, `babel-plugin-transform-object-super`, `babel-plugin-transform-private-methods`
  - [#&#8203;18595](babel/babel#18595) Keep the receiver of TS-wrapped `super` and private member calls ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-parser`
  - [#&#8203;18596](babel/babel#18596) fix(parser): allow ASI between modifier-like field and [@&#8203;dec](https://github.com/dec) ([@&#8203;babel-bot](https://github.com/babel-bot))
  - [#&#8203;18588](babel/babel#18588) fix(parser): rework ts arrow param tracking ([@&#8203;babel-bot](https://github.com/babel-bot))
  - [#&#8203;18542](babel/babel#18542) fix(parser): handle async do await in parameters ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helper-string-parser`, `babel-parser`
  - [#&#8203;18591](babel/babel#18591) fix(parser): recover from out-of-range `\u{...}` code points ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-generator`
  - [#&#8203;18585](babel/babel#18585) fix(generator): keep parens that end an optional chain before ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-plugin-transform-class-static-block`
  - [#&#8203;18579](babel/babel#18579) fix(class-static-block): skip class body path with stale ancestry ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helper-module-transforms`, `babel-parser`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types`
  - [#&#8203;18574](babel/babel#18574) fix: improve string module specifiers support ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-plugin-transform-flow-comments`
  - [#&#8203;18573](babel/babel#18573) fix(flow-comments): support anonymous classes ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-plugin-transform-block-scoping`, `babel-traverse`
  - [#&#8203;18571](babel/babel#18571) fix: rename assignment targets in forXStatement ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3`
  - [#&#8203;18569](babel/babel#18569) fix(regenerator): dispatch pending jump after finally to outer finally blocks ([@&#8203;babel-bot](https://github.com/babel-bot))

##### 🏠 Internal

- [#&#8203;18575](babel/babel#18575) ci: do not run hooks of skipped describe blocks on Jest 24 ([@&#8203;JLHwung](https://github.com/JLHwung))

##### Committers: 2

- Babel Bot ([@&#8203;babel-bot](https://github.com/babel-bot))
- Huáng Jùnliàng ([@&#8203;JLHwung](https://github.com/JLHwung))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.x: not on babel 8 PR: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants