Conversation
|
How will this work across versions? Please don't underestimate the pain that inconsistencies in the test runner CLI across versions cause for users (ie glob support). It takes years for these pain points to go away. |
|
@cjihrig we discussed in today's meeting. I'm about to update this with the 3rd option that was born from that. I'll ping you for review in a few minutes. |
|
Discussed with @JakobJingleheimer and apparently it will not break existing users, so 👍 |
|
I think "option 3" will actually JustWork? node
--test ./foo.test.js
--test ./bar.test.jscurrently results in: [
'./foo.test.js',
'--test',
'./bar.test.js',
]
We can backport support for |
Ethan-Arrowood
left a comment
There was a problem hiding this comment.
I'm still seeing some parts of this talking about main entrypoints with the test runner which just doesn't make sense. I'd prefer we clean that up before merging this as that may only cause more confusion in further discussions.
Are you talking about the other options besides the one added yesterday? If so, my plan was to wait for people to weigh in; once one is selected, update the proposal to move the discard ones to a new "Rejected" section, and outdent the selected option. If you're talking about the small bit mentioning |
…ncluding defaults plus extras
|
Maybe I'm not tracking; I am just confused by a script like: Like test mode should "overrule" the watch mode here. Unless the expectation is for that example to actually favor the watch entrypoint over test entries. Take Only So i want to be clear in our examples of what the behavior of combining I hope I'm making sense. Kinda difficult to explain I guess |
|
Maybe my confusion / concern is that I'm conflating When you use Thus we should be careful about language like "main entrypoint" because that implies its going to be executed (at least thats how I interpret it). I recognize that another interpretation is the main entrypoint is the default watch path. Yeah this is a confusing one. |
|
In other words, |
Regarding |
|
Not sure if you all have seen these or not, but they seem relevant: |
Regarding this, I took a look and tried running the repro against versions from 20 to the latest version. As far as I can see, we have never supported this specific behavior. I'm also reviewing the proposed PR, but I have the impression that it's still a somewhat "hacky" solution. I'm wondering if, following what we are proposing in this discussion and in line with other functionalities, we should support something like Having such an option would automatically translate into config support as well. |
|
@Ethan-Arrowood ohhhhhhhh! yes, now I get it: Does not do what I was / we were thinking: Here, it triggers watch mode with an entry-point of What if a user lists In that case, (I believe what we said in the meeting today is that this should throw; |
|
If None of the following would have any ambiguity: node test
node test --watch
node test test/*.test.js
node test --watch test/*.test.js ‑‑reporter lcov
node test ‑‑reporter lcov test/*.test.js --watch
node test test/*.test.js other.test.js
node test test/*.test.js ‑‑reporter lcov other.test.js
node test --only --concurrency=1 --update-snapshots
node test test/*.test.js -- "arg passed to test scripts"
Test‑specific options such as The issues linked above by @cjihrig and @pmarchini, in addition to nodejs/node#51384 which @cjihrig identified as high impact (#21), would have clean resolution. There is precedence for node subcommands: node ‑‑inspect script.js # "node script.js" with optional debugging listener enabled
node inspect script.js # start interactive debugger against script.jsI would migrate at least
This isn't either‑or. One of the "un/break" proposals in this PR may make sense as a practical, near‑term fix to the current Alternatively, a separate See also nodejs/node#53483 by @MoLow. If there is appetite for this, I could write up a more in‑depth analysis, covering nuances such as how |
That's an interesting idea; at first glance, it makes a lot of sense. @pmarchini what do you think? (If we do it, I think we should not tether that to IIR, there was some discussion within the PR introducing |
A follow-up to the discussion in the 26 Jan 2026 team meeting