Skip to content
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: skip whatwg url parse tests when icu is missing #9246

Closed
wants to merge 2 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Oct 23, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

The WHATWG url parser relies on ICU's punycode implementation. A handful of the standard tests fail when ICU is not present because of the additional checks that are not implemented. For now, skip the parse tests if ICU is not present.

@jasnell jasnell added url Issues and PRs related to the legacy built-in url module. test Issues and PRs related to the tests. labels Oct 23, 2016
@jbergstroem
Copy link
Member

It looks like we're using different methods throughout the test suite to figure out whether we have Intl support. Can you perhaps create a common.hasIntl while at it?

@jasnell
Copy link
Member Author

jasnell commented Oct 23, 2016

good idea

@jasnell
Copy link
Member Author

jasnell commented Oct 23, 2016

@@ -525,3 +525,7 @@ exports.expectWarning = function(name, expected) {
expected.splice(expected.indexOf(warning.message), 1);
}, expected.length));
};

exports.hasIntl = function hasIntl() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other common.hasFoo properties are either simple data properties or getters, not functions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. switched to a getter

Copy link
Contributor

@silverwind silverwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits.


if (!common.hasIntl) {
// A handful of the tests fail when ICU is not included.
common.skip('missing intl... skipping test');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intl


if (!common.hasIntl) {
// A handful of the tests fail when ICU is not included.
common.skip('missing intl... skipping test');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intl

the WHATWG url parser relies on ICU's punycode implementation.
A handful of the standard tests fail when ICU is not present
because of the additional checks that are not implemented. For
now, skip the parse and setter tests if ICU is not present.
@jasnell
Copy link
Member Author

jasnell commented Oct 24, 2016

@jasnell
Copy link
Member Author

jasnell commented Oct 24, 2016

Unrelated failures in CI.

Copy link
Member

@jbergstroem jbergstroem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bnoordhuis
Copy link
Member

Apropos the WHATWG URL tests, would it be possible to add a 'needs intl' heuristic? Something like /[^\u0000-\u007F]/.test(test.input)?

@jasnell
Copy link
Member Author

jasnell commented Oct 24, 2016

Yeah, I was considering adding a check but making it more explicit by adding metadata to the test fixture to say whether or not ICU is required for that item. Takes the guess work out of it.

@jasnell
Copy link
Member Author

jasnell commented Oct 24, 2016

that said, this commit is intended primarily to make sure the non-intl CI is running green until I can get that done. Since the new URL parser is an experimental feature still, it shouldn't be holding things up

jasnell added a commit that referenced this pull request Oct 25, 2016
PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
jasnell added a commit that referenced this pull request Oct 25, 2016
the WHATWG url parser relies on ICU's punycode implementation.
A handful of the standard tests fail when ICU is not present
because of the additional checks that are not implemented. For
now, skip the parse and setter tests if ICU is not present.

PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@jasnell
Copy link
Member Author

jasnell commented Oct 25, 2016

Landed in d7e4ae1...52670fc

@jasnell jasnell closed this Oct 25, 2016
evanlucas pushed a commit that referenced this pull request Nov 2, 2016
PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
evanlucas pushed a commit that referenced this pull request Nov 2, 2016
the WHATWG url parser relies on ICU's punycode implementation.
A handful of the standard tests fail when ICU is not present
because of the additional checks that are not implemented. For
now, skip the parse and setter tests if ICU is not present.

PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
TimothyGu pushed a commit to TimothyGu/node that referenced this pull request Nov 28, 2017
PR-URL: nodejs#9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@TimothyGu TimothyGu mentioned this pull request Nov 28, 2017
4 tasks
MylesBorins pushed a commit that referenced this pull request Jan 18, 2018
Backport-PR-URL: #17365
PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2018
MylesBorins pushed a commit that referenced this pull request Feb 11, 2018
Backport-PR-URL: #17365
PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Feb 12, 2018
Backport-PR-URL: #17365
PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Feb 13, 2018
Backport-PR-URL: #17365
PR-URL: #9246
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants