This repository has been archived by the owner on Jul 28, 2021. It is now read-only.
[POC]: Porting WPT utilities in Node.js core #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per the request from @mcollina , this is a proof of concept on how to use the WPT utilities in Node.js core to run WPT outside Node.js core.
Here is an outline of how the WPT currently works in Node.js core:
git node wpt
) that download tests into a specific folder and keep them in sync while maintaining a map of commit hashes. node-core-utils is a stand-alone CLI toolkit available on npm.On how the current workflow looks like, and how the status file works the detailed documentation can be found in
test/wpt/README.md
in Node.js core.These are the steps run to create this PR:
Result:
As you can see here, we are not quite there yet - the WPT runner in Node.js core currently only runs tests found in the top level of the specified directory, but the stream tests are placed in subdirectories - though it should be easy to fix with some recursive readdirs in https://github.com/nodejs/node/blob/2742f38/test/common/wpt.js
AFAICT, the differences between the WPT runner and https://github.com/domenic/wpt-runner which is used to run the tests of the reference implementation are:
I don't have an opinion on how the tests should be run in this repo, but I hope an explanation would help since the this project may eventually end up being in Node.js core.
cc @domenic