-
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: add comments for whatwg-url tests #14355
Conversation
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 like the format, not sure about the number of files modified.
@@ -15,7 +15,8 @@ const request = { | |||
}; | |||
|
|||
/* eslint-disable */ | |||
/* WPT Refs: | |||
/* The following tests are copied from WPT, modifications to them should be upstreamed first. |
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.
Looks like this PR only changes 16 files, but looking in test/parallel/
I see 26 with the test-whatwg
prefix:
➜ parallel git:(master) ✗ ❯ ls | grep test-whatwg ~/wrk/com/node/test/parallel
test-whatwg-url-constructor.js
test-whatwg-url-domainto.js
test-whatwg-url-historical.js
test-whatwg-url-inspect.js
test-whatwg-url-origin.js
test-whatwg-url-parsing.js
test-whatwg-url-properties.js
test-whatwg-url-searchparams-append.js
test-whatwg-url-searchparams-constructor.js
test-whatwg-url-searchparams-delete.js
test-whatwg-url-searchparams-entries.js
test-whatwg-url-searchparams-foreach.js
test-whatwg-url-searchparams-get.js
test-whatwg-url-searchparams-getall.js
test-whatwg-url-searchparams-has.js
test-whatwg-url-searchparams-inspect.js
test-whatwg-url-searchparams-keys.js
test-whatwg-url-searchparams-set.js
test-whatwg-url-searchparams-sort.js
test-whatwg-url-searchparams-stringifier.js
test-whatwg-url-searchparams-values.js
test-whatwg-url-searchparams.js
test-whatwg-url-setters.js
test-whatwg-url-toascii.js
test-whatwg-url-tojson.js
test-whatwg-url-tostringtag.js
➜ parallel git:(master) ✗ ❯ ls | grep test-whatwg | wc -l ~/wrk/com/node/test/parallel
26
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 believe the delta are files that do not contain imported code.
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.
@gautamarora thank you very much. There are also 3 fixture files that would love to get some attention:
|
Also thanks for being thorough, but could you remove these lines from the commit message? ##### Checklist
- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes
- [x] commit message follows [commit
guidelines](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#c
ommit-message-guidelines)
##### Affected core subsystem(s)
test, url |
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.
% adding the fixtures
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.
💯
That would be a nice to have: |
@refack - updated the guide. |
@refack - cleaned up the commit message. Let me know if there is any other clean up |
doc/guides/writing-tests.md
Outdated
@@ -264,7 +264,8 @@ These imported tests will be wrapped like this: | |||
|
|||
```js | |||
/* eslint-disable */ | |||
/* WPT Refs: | |||
/* The following tests are copied from WPT, modifications to them should be upstreamed first. |
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 please keep the lines under 80 chars? Not sure why the linter didn't catch that.
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 can certainly make the change, the recommendation for that particular comment is as per discussion here cc @joyeecheung for feedback as well.
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.
Maybe ignoreComments
in max-len
is true by default?
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.
nevermind, i could also do something like this:
/* eslint-disable */
/* The following tests are copied from WPT, modifications to them should be
upstreamed first. Refs:
https://github.com/w3c/web-platform-tests/blob/54c3502d7b/url/urlsearchparams-constructor.html
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
*/
making the changes now.
cc @not-an-aardvark, @silverwind, @Trott Is |
Seems
Should we place |
@TimothyGu - pushed a commit to keep lines under 80 chars in tests/fixtures/doc. let me know if this is good now. |
No, it's
¯\_(ツ)_/¯ |
Yes, I think we definitely should. @gautamarora would you be able to do that? |
@not-an-aardvark Thank you. Sorry for bothering, I've missed we eslintignore |
@gibfahn - yes, i will make the changes for this. |
Added comments to whatwg-url tests that they should not be changed until modifications are merged upstream as per guidelines for [Web Platform Tests](https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#web-platform-tests) Fixes: #12793
@gibfahn @vsemozhetbyt @TimothyGu I've moved For the test fixtures, the linting is ignored due to |
Micro-nit: The first sentence of the comments contains a comma splice:
The comma should be a period (or perhaps a semicolon):
No way this should hold up landing of the PR, though. :-D But if you want to fix it, or if you have to go in and fix other things anyway, then awesome. |
@Trott - replaced comma with period :) |
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.
💯+
@gautamarora I see you are getting the full bikeshed PR treatment 😉. Thank you again for bearing with us... |
@refack haha! no worries, i totally get it. Thanks for all the amazing feedback, i learnt much more than just adding comments like linting and running individual tests, so hopefully can contribute more. Let me know if you need anything more from my end. From what I have understood so far, @vsemozhetbyt will need to start another CI build with the latest changes. |
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.
LGTM. Thanks for picking this up!
Anyone of the Collaborators can start a CI, you should ping us when you think the PR is stable. |
Added comments to whatwg-url tests that they should not be changed until modifications are merged upstream as per "Web Platform Tests" guidelines PR-URL: nodejs#14355 Fixes: nodejs#12793 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 9e4ab6c |
Added comments to whatwg-url tests that they should not be changed until modifications are merged upstream as per "Web Platform Tests" guidelines PR-URL: #14355 Fixes: #12793 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Added comments to whatwg-url tests that they should not be changed until modifications are merged upstream as per "Web Platform Tests" guidelines PR-URL: #14355 Fixes: #12793 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Added comments to whatwg-url tests to document that they should not be modified until modifications are made upstream as per guidelines for Web Platform Tests
Fixes: #12793
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesmake lint
Affected core subsystem(s)
test, url