-
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: move WPT to its own testing module #12736
Conversation
This is a sort of trial balloon to see if there's support for this sort of change generally. /cc @nodejs/testing @nodejs/url |
@@ -226,109 +228,109 @@ Tests whether `name` and `expected` are part of a raised warning. | |||
|
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.
## getArrayBufferViews(buf)
-> #### getArrayBufferViews(buf)
right? (L225)
+1 on the initiative, but I wonder if we shouldn't have a |
LGTM in this case as -const { test, assert_equals } = common.WPT;
+const { test, assert_equals } = require('../wpt'); isn't a big deal. But in general if we're going to split up common and start having: -const common = require('../common');
+require('../common');
+const commonx = require('../commonx');
+const commony = require('../commony');
+const commonz = require('../commonz'); then I'm not sure what the benefit is (or if it outweighs the increased complexity, especially for new contributors). Same applies to adding a |
Good idea. We could move |
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.
I'm +0 on doing this but the changes LGTM
test/README.md
Outdated
* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | ||
|
||
Checks whether `IPv6` is supported on this platform. | ||
|
||
### hasMultiLocalhost | ||
#### hasMultiLocalhost |
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.
If we're editing these, could we move the h* properties so that they're in alphabetical order?
I like the idea of a I don't like losing access to everything I need for testing from |
I'm +0 zero on this change. Is it a problem to load it for every test ? If not then if we want to modularize into separate files maybe we can do that but still end up with a single import ? |
rebased to resolve conflict and resolve README nits |
Even if we don't do this for anything else, I think it makes a lot of sense to split out the WPT stuff because it really is its own thing that gets used its own way. People shouldn't use it without fully understanding where it comes from and why it is the way it is. At the same time, it isn't something people need to bother with in the vast majority of cases. |
Uhm, what is "WPT"? |
I'm indifferent towards splitting out WPT. Its (very specific) use is documented, and I'm of the opinion that people generally won't touch the stuff they don't know about. Though I can see how logically it might not fit with the rest of On splitting up On splitting up and lazy-loading different utilities, I'm –1. If the time being spent on loading |
@TimothyGu You make some good points, for sure. The main benefit would be for newcomers looking at the docs. Instead of dozens of properties, many of which won't matter to them, it can just be properties that are easy to understand and whose value is readily apparent. Like, (On the other hand, looking at |
I really like the |
test/README.md
Outdated
* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | ||
|
||
Name of the temp directory used by tests. | ||
|
||
### WPT | ||
### wpt |
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.
Should this be common/wpt
?
test/README.md
Outdated
## Common module API | ||
## Testing Module APIs | ||
|
||
### common | ||
|
||
The common.js module is used by tests for consistency across repeated |
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.
Are we still calling the module common.js
after the refactor? How about just common
?
Pushed fixes for README nits. Probably want to move the docs for the common module etc. into |
Split out into separate READMEs and force-pushed. |
Rebased to resolve conflict. |
The link is missing. Probably should add an entry for |
Heh! Also: Should add an entry for the |
Entry for |
test/README.md
Outdated
@@ -49,6 +44,14 @@ On how to run tests in this direcotry, see | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>common</td> | |||
<td>No</td> |
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.
fixtures
and testpy
leave this column empty.
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.
Minor nit otherwise LGTM.
This is first in a hoped-for series of moves away from a monolithic common.js that is loaded for every test and towards a more modular approach. (In the end, common.js will hopefully contain checks for variables leaking into the global space and perhaps some of the more ubiquitous functions like common.mustCall().) Move the WPT testing code to its own module.
Nit addressed. CI: https://ci.nodejs.org/job/node-test-pull-request/7822/ |
Landed in ff001c1 |
This is first in a hoped-for series of moves away from a monolithic common.js that is loaded for every test and towards a more modular approach. (In the end, common.js will hopefully contain checks for variables leaking into the global space and perhaps some of the more ubiquitous functions like common.mustCall().) Move the WPT testing code to its own module. PR-URL: nodejs#12736 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This is first in a hoped-for series of moves away from a monolithic common.js that is loaded for every test and towards a more modular approach. (In the end, common.js will hopefully contain checks for variables leaking into the global space and perhaps some of the more ubiquitous functions like common.mustCall().) Move the WPT testing code to its own module. PR-URL: nodejs#12736 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This is first in a hoped-for series of moves away from a monolithic common.js that is loaded for every test and towards a more modular approach. (In the end, common.js will hopefully contain checks for variables leaking into the global space and perhaps some of the more ubiquitous functions like common.mustCall().) Move the WPT testing code to its own module. PR-URL: nodejs#12736 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This is first in a hoped-for series of moves away from a monolithic common.js that is loaded for every test and towards a more modular approach. (In the end, common.js will hopefully contain checks for variables leaking into the global space and perhaps some of the more ubiquitous functions like common.mustCall().) Move the WPT testing code to its own module. PR-URL: #12736 Backport-PR-URL: #13775 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This is first in a hoped-for series of moves away from a monolithic common.js that is loaded for every test and towards a more modular approach. (In the end, common.js will hopefully contain checks for variables leaking into the global space and perhaps some of the more ubiquitous functions like common.mustCall().) Move the WPT testing code to its own module. PR-URL: #12736 Backport-PR-URL: #13775 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This is first in a hoped-for series of moves away from a monolithic
common.js that is loaded for every test and towards a more modular
approach. (In the end, common.js will hopefully contain checks for
variables leaking into the global space and perhaps some of the more
ubiquitous functions like common.mustCall().)
Move the WPT testing code to its own module.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test url