-
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
--test-name-pattern
not working for async describe suites
#54084
Comments
Thank you for the pointer @jakecastelli 🙏 While we wait for @cjihrig, I'll take a look myself too. I'll let you know if I find anything ⚙️ |
I took a look out of curiosity and it seems to be an async bug related to the logic that changes a suite from filtered to not filtered in When the example above is ran, the sync suite gets @cjihrig would probably know best though. |
Yes, without testing it, I believe what @EddieAbbondanzio is correct. I think the correct fix is to wait for the suites to be finished building before beginning to execute anything. |
I've thought about this a bit, and I think waiting for the suites to complete is necessary, but not enough to fix this. I'm going to add another commit to #54011 that drops the returned promise from the top level |
This commit updates the test runner to wait for suites to finish building before starting any tests. This is necessary when test filtering is enabled, as suites may transition from filtered to not filtered depending on what is inside of them. Fixes: nodejs#54084 Fixes: nodejs#54154
This commit updates the test runner to wait for suites to finish building before starting any tests. This is necessary when test filtering is enabled, as suites may transition from filtered to not filtered depending on what is inside of them. Fixes: nodejs#54084 Fixes: nodejs#54154
This commit updates the test runner to wait for suites to finish building before starting any tests. This is necessary when test filtering is enabled, as suites may transition from filtered to not filtered depending on what is inside of them. Fixes: #54084 Fixes: #54154 PR-URL: #54423 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Version
v22.5.1
Platform
Subsystem
test runner
What steps will reproduce the bug?
With a suite like the following:
Run the tests with
--test-name-pattern="some test"
:How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
I would expect both the test suites
async describe
andsync describe
to work.What do you see instead?
Only the
sync describe
suite seem to be working.Additional information
By running the tests without any test name pattern, they all get executed:
The text was updated successfully, but these errors were encountered: