Skip to content

test: add test for url module domainToAscii and domainToUnicode - #10031

Closed
DarylThayil wants to merge 3 commits into
nodejs:masterfrom
DarylThayil:domain-to-ascii-unicode
Closed

test: add test for url module domainToAscii and domainToUnicode#10031
DarylThayil wants to merge 3 commits into
nodejs:masterfrom
DarylThayil:domain-to-ascii-unicode

Conversation

@DarylThayil

Copy link
Copy Markdown
Checklist
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

Tests

Description of change

Added tests for url.URL.domainToASCII and url.URL.domainToUnicode with see data that transforms one way, and checks, then transform backwards and checks for strictEqual

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyllerimyller added url Issues and PRs related to the legacy built-in url module. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. labels Dec 1, 2016
@Trott

Trott commented Dec 5, 2016

Copy link
Copy Markdown
Member

/cc @jasnell

@Trott

Trott commented Dec 5, 2016

Copy link
Copy Markdown
Member

@jasnelljasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Almost there. Just needs one small fix

['भारत.org', 'xn--h2brj9c.org']
];

domainWithASCII.forEach(pair => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please wrap the pair in parens to match the common style

@DarylThayil

Copy link
Copy Markdown
Author

@jasnell updated, how to i kick off ci again ?

@jasnell

Copy link
Copy Markdown
Member

Still getting some linting issues...

$ make lint
./node tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules \
benchmark lib test tools
/Users/james/Node/main/node/test/parallel/test-url-domain-ascii-unicode.js
21:5 error Expected indentation of 2 spaces but found 4 indent
22:5 error Expected indentation of 2 spaces but found 4 indent
23:5 error Expected indentation of 2 spaces but found 4 indent
24:5 error Expected indentation of 2 spaces but found 4 indent
25:5 error Expected indentation of 2 spaces but found 4 indent
26:5 error Expected indentation of 2 spaces but found 4 indent
✖ 6 problems (6 errors, 0 warnings)
make: *** [jslint] Error 1

@DarylThayil

Copy link
Copy Markdown
Author

okay cool, ill make sure and run lint from now on thanks, will update

@jasnell

Copy link
Copy Markdown
Member

@Trott

Trott commented Dec 6, 2016

Copy link
Copy Markdown
Member

CI is ✅

jasnell pushed a commit that referenced this pull request Dec 6, 2016
PR-URL: #10031
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

Copy link
Copy Markdown
Member

Landed in f8e07d0. Thank you for the PR and for participating in the code-and-learn!

@jasnelljasnell closed this Dec 6, 2016
Fishrock123 pushed a commit that referenced this pull request Dec 6, 2016
PR-URL: #10031
Reviewed-By: James M Snell <jasnell@gmail.com>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
PR-URL: nodejs#10031
Reviewed-By: James M Snell <jasnell@gmail.com>
@joyeecheungjoyeecheung added the whatwg-url Issues and PRs related to the WHATWG URL implementation. label Jan 5, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.testIssues and PRs related to the tests.urlIssues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@DarylThayil@Trott@jasnell@MylesBorins@imyller@joyeecheung@nodejs-github-bot@darylthayilporch