-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: allow test coverage, module mocks, and snapshots in NODE_OPTIONS
#56114
base: main
Are you sure you want to change the base?
cli: allow test coverage, module mocks, and snapshots in NODE_OPTIONS
#56114
Conversation
b675dd3
to
e711f68
Compare
NODE_OPTIONS
NODE_OPTIONS
@JakobJingleheimer ffr the api request to change github labels is done as a "here's all the labels this issue has" request, not a delta, so there was a race condition between you and the bot. the bot said "it's just these 2!" and you said "it's just this 1!". |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56114 +/- ##
=======================================
Coverage 88.00% 88.00%
=======================================
Files 656 656
Lines 189002 189002
Branches 36003 36000 -3
=======================================
+ Hits 166335 166338 +3
- Misses 15838 15839 +1
+ Partials 6829 6825 -4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these the only flags that need adding to NODE_OPTIONS
? Or at least the only test runner-related ones. We might as well add all the missing ones, or at least the missing test runner flags, while we’re at it.
I have no idea why only some flags are allowed in NODE_OPTIONS, and I can't find anyone who knows. |
@@ -3070,6 +3070,9 @@ one is included in the list below. | |||
* `--experimental-shadow-realm` | |||
* `--experimental-specifier-resolution` | |||
* `--experimental-strip-types` | |||
* `--experimental-test-coverage` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested, but I would expect passing --experimental-test-coverage
in NODE_OPTIONS
to cause problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test runner explicitly tries to filter that argument out when launching worker processes, but NODE_OPTIONS
sidesteps that. It may work, but I wouldn't count on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll test that locally against nodejs/userland-migrations#7, which should spawn workers via test runner.
After asking the @nodejs/test_runner team, there does not appear to be a particular reason these are not already included.