Repository navigation
Do not pass a removed Node flag in the frontend tests - #102
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI on every pull request currently fails in two tests,
test_feature_modules_have_no_import_time_browser_side_effectsandtest_frontend_node_units, withnode: 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.pypasses 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)node --test tests/js/frontend-modules.test.mjsalso pass with the flag omitted, which is what a newer Node doesruff check tests: cleanNot reproduced locally: the runner's exact Node version. This PR's own CI run is the check.