Skip to content

Conversation

@watilde
Copy link
Contributor

Add a case to test an URL object that has no path at all for url.resolveObject.

This test increases the coverage of lib/url.js:

The following lines will be checked:

  • node/lib/url.js

    Lines 846 to 849 in 055482c

    if(!srcPath.length){
    // no path at all. easy.
    // we've already handled the other stuff above.
    result.pathname=null;
  • node/lib/url.js

    Lines 853 to 858 in 055482c

    }else{
    result.path=null;
    }
    result.href=result.format();
    returnresult;
    }

This PR was part of #11395 that I created, and I separated a non-breaking change commit from #11395 to this PR. I will update #11395 later.

Checklist
  • make -j4 test
  • tests is included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Mar 12, 2017
@watildewatilde added the url Issues and PRs related to the legacy built-in url module. label Mar 12, 2017
@watilde
Copy link
ContributorAuthor

Add a case to test an URL object that has no path at all for `url.resolveObject`.
@watildewatildeforce-pushed the feature/test-url-no-path branch from 9e63110 to 069fa16CompareMarch 12, 2017 14:03
@watildewatilde changed the title url: test resolveObject with an empty pathtest: test resolveObject with an empty pathMar 12, 2017
@watilde
Copy link
ContributorAuthor

Updated the name of a subsystem to test from url in a commit message and this issue title.

@watilde
Copy link
ContributorAuthor

@watilde
Copy link
ContributorAuthor

Same with this: #11812 (comment). I will rerun the CI.

@watilde
Copy link
ContributorAuthor

@watilde
Copy link
ContributorAuthor

Landed in 92bcc13

@watildewatilde closed this Mar 14, 2017
@watildewatilde deleted the feature/test-url-no-path branch March 14, 2017 19:47
watilde added a commit that referenced this pull request Mar 14, 2017
Add a case to test an URL object that has no path at all for `url.resolveObject`. PR-URL: #11811 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Mar 20, 2017
Add a case to test an URL object that has no path at all for `url.resolveObject`. PR-URL: nodejs#11811 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
@italoacasasitaloacasas mentioned this pull request Mar 20, 2017
jungx098 pushed a commit to jungx098/node that referenced this pull request Mar 21, 2017
Add a case to test an URL object that has no path at all for `url.resolveObject`. PR-URL: nodejs#11811 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testIssues and PRs related to the tests.urlIssues and PRs related to the legacy built-in url module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@watilde@jasnell@cjihrig@hiroppy@joyeecheung@MylesBorins@nodejs-github-bot