Skip to content

Do not pass a removed Node flag in the frontend tests - #102

Merged
oney-erge merged 1 commit into
mainfrom
fix/node-module-flag
Nov 20, 2026
Merged

oney-erge merged 1 commit into
mainfrom
fix/node-module-flag

Conversation

@oney-erge

Copy link
Copy Markdown
Owner

Problem

CI on every pull request currently fails in two tests, test_feature_modules_have_no_import_time_browser_side_effects and test_frontend_node_units, with node: bad option: --experimental-default-type=module. They pass the flag to Node, and the runner's Node no longer accepts it. The last green run on main was 2026-11-16; the most recent merge to main was [skip ci], so nothing caught it.

Change

tests/node_flags.py passes the flag only when the installed Node accepts it. Node 22.7 and later detect ES module syntax by themselves, and the flag is needed only on older Node. Both tests use the helper, and a new test covers the accept and reject cases.

Verification

  • pytest tests/test_web_assets.py tests/test_web_js_units.py: 17 passed (Node 22.11, flag accepted)
  • The same module imports and node --test tests/js/frontend-modules.test.mjs also pass with the flag omitted, which is what a newer Node does
  • ruff check tests: clean

Not reproduced locally: the runner's exact Node version. This PR's own CI run is the check.

Two tests ran node with --experimental-default-type=module. Node 22.7 and later
detect ES module syntax on their own and Node 25 removed the flag, so on the
current runner both tests failed with 'node: bad option'. Pass the flag only
when the installed Node accepts it.
@oney-erge
oney-erge merged commit 75e3454 into main Nov 20, 2026
9 checks passed
@oney-erge
oney-erge deleted the fix/node-module-flag branch November 20, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant