Version
v22.7.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
- Create an empty
latest.js file
- Run the Node.js test runner
fnm use 20
# Using Node v20.17.0
node --test
# ℹ tests 0
# ℹ suites 0
# ℹ pass 0
# ℹ fail 0
# ℹ cancelled 0
# ℹ skipped 0
# ℹ todo 0
# ℹ duration_ms 4.365042
fnm use 22
# Using Node v22.7.0
node --test
# ✔ latest.js (43.960958ms)
# ℹ tests 1
# ℹ suites 0
# ℹ pass 1
# ℹ fail 0
# ℹ cancelled 0
# ℹ skipped 0
# ℹ todo 0
# ℹ duration_ms 53.687041
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
By default, Node.js will run all files matching these patterns:
**/*.test.?(c|m)js
**/*-test.?(c|m)js
**/*_test.?(c|m)js
**/test-*.?(c|m)js
**/test.?(c|m)js
**/test/**/*.?(c|m)js
https://nodejs.org/api/test.html#running-tests-from-the-command-line
What do you see instead?
latest.js filename does not match the above patterns, but is included in node --test
Additional information
No response
Version
v22.7.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
latest.jsfileHow often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
https://nodejs.org/api/test.html#running-tests-from-the-command-line
What do you see instead?
latest.jsfilename does not match the above patterns, but is included innode --testAdditional information
No response