-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
[Node v21] node --test executes tests twice if they are in folder named test #50875
Labels
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
test_runner
Issues and PRs related to the test runner subsystem.
Comments
MoLow
added
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
test_runner
Issues and PRs related to the test runner subsystem.
labels
Nov 23, 2023
martenrichter
pushed a commit
to martenrichter/node
that referenced
this issue
Nov 26, 2023
PR-URL: nodejs#50881 Fixes: nodejs#50875 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
lucshi
pushed a commit
to lucshi/node
that referenced
this issue
Nov 27, 2023
PR-URL: nodejs#50881 Fixes: nodejs#50875 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
test_runner
Issues and PRs related to the test runner subsystem.
Version
21.2.0
Platform
Linux DEU1118 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 2 18:01:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Preparation
mkdir issue1
cd issue1
npm init
"type": "module"
. at the end it will look like thistest
sub-foldermkdir test
bug.test.js
in thetest
sub-folder with the following contentHow to Reproduce
execute from the main folder
node --test
the test will be executed twice. an example output:
How to "Fix"
rename your
test
folder to something else:mv test mest
execute again from the main folder
node --test
the test will be executed once. an example output:
How often does it reproduce? Is there a required condition?
It can be reproduced every single time
the required conditions are:
*.test.js
file(s) in a folder namedtest
node
21.*
What is the expected behavior? Why is that the expected behavior?
The expected behavior is the test to be executed once:
This is the expected behavior because I have one single test in one single file in the whole project
What do you see instead?
Test was executed twice:
Additional information
No response
The text was updated successfully, but these errors were encountered: