-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
test: increase coverage for URL.searchParams #10952
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
Conversation
8d0ef6f to
c7f159a
Compare
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.
Might be worth checking done here too.
c7f159a to
91ec5aa
Compare
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.
Most of these tests were actually derived from W3C's web-platform-tests, so I'm sure they would appreciate these changes 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.
Also useful might be making sure entries[Symbol.iterator]() === entries.
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.
You may also test calling entries.next again (to simulate overread).
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.
entries.next.call(undefined) should throw 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.
This test seems to overlap with a series of similar, but more comprehensive tests in #10905. I'm fine with keeping it in this PR, but I'd prefer just dropping it here.
|
@TimothyGu Thank you for reviews. PTAL 9c326fe EDIT: I'll squash. |
9c326fe to
b031c07
Compare
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.
@abouthiroppy, this PR seems to stop working after ed0086f. Can you please rebase and make sure it works on master? Thanks.
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.
This is also not needed any more after 326e967.
b031c07 to
0626657
Compare
|
@TimothyGu I rebased and confirmed that the test passed. Thanks. |
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.
Actually do you mind fixing this and in -values.js as well?
const URLSearchParams = require('url').URLSearchParams;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.
Thanks, I forgot to change it.
Improve coverage for entries, keys and values. Validation tests and exception tests are included.
0626657 to
189de74
Compare
|
Landed in e7f4825. |
PR-URL: #10952 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
PR-URL: #10952 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
* index: allow #fragments in PR URLs Also check tightened PR_RE against pathname * review: fix Metadata state operation E.g. nodejs/node#10952 * review: simplify Fixes creation * review: overhaul getCollaborators() - Make regex static and more concise - Iterate over RE.exec - Use Map * review: remove extra whitespace Fixes: #5 * review: only look for LGTMs in <p>'s Fixes: nodejs/node#10657
Add exceptions for all cases.
Add
entries,keysandvaluesfiles.(Validation tests and exception tests are included.)Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test