-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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_runner: Convert file URLs to paths in test enqueue method #51615
Conversation
Review requested:
|
df6d91a
to
c1cc29b
Compare
Should we consider using URLs everywhere instead? In case we want to support test input that are not in the file system (e.g. HTTPS modules) |
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.
Can you add a test?
Can you please add a test that validates that all URLs produced are parseable? Note that I had to do https://github.com/mcollina/borp/blob/c7c99c1c70afcbd13f903b678fbbec7c821e72fc/lib/reporters.js#L6-L14 to parse this. I think this currently fails on Windows. I generically prefer paths because #51609 and writing tests is more complicated if the implementation of the conversion is system dependent. |
I added a test, so sorry for my delay ❤️ |
please check test failures |
Isn't this a breaking change? |
instead of the old solution I made a normalizeFilePath method and replaced the path with file if |
What are the test failures, for at least a few of the representative ones? I’m suspicious about the several module- and filesystem-related failures. If this PR changes something core to Node about how file paths/file URLs are handled, and that’s resulting in broken tests in systems beyond the test runner, that smells like a bug being introduced. I’m sympathetic to the desire to see more useful representation of test files in test runner output, but not at the cost of a breaking change that affects core stuff. |
The linked issue is now closed, so I'll go ahead and close this as well. Thanks for the PR though. |
The enqueue method of the test runner now converts file URLs to file paths before emitting test events. This change ensures consistency in file representations and resolves parsing issues on platforms like Windows.
#51610