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: add a test case for the path.posix.resolve #27905

Merged
merged 1 commit into from
May 27, 2019

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented May 26, 2019

In posix path.resolve should handle relative paths to be safe even if process.cwd fails.

At lib/path.js#999:

    return resolvedPath.length > 0 ? resolvedPath : '.';

Else branch wasn't covered.

Add a test case to cover this.

Checklist

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 26, 2019
Copy link
Contributor

@ryzokuken ryzokuken 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 Anna's comments addressed, thanks!

@ryzokuken ryzokuken added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label May 26, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@gireeshpunathil gireeshpunathil added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 27, 2019
@ChALkeR
Copy link
Member

ChALkeR commented May 27, 2019

Please react with 👍for fast-tracking.

@ChALkeR ChALkeR added the fast-track PRs that do not need to wait for 48 hours to land. label May 27, 2019
In posix path.resolve should handle relative paths to be safe
even if process.cwd fails.

At lib/path.js#999:
    return resolvedPath.length > 0 ? resolvedPath : '.';
Else branch wasn't covered.

Add a test case to cover this.

PR-URL: nodejs#27905
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
@ChALkeR ChALkeR merged commit e3555e9 into nodejs:master May 27, 2019
@ChALkeR
Copy link
Member

ChALkeR commented May 27, 2019

Landed in e3555e9.

Thanks for the contribution! 🎉

https://www.nodetodo.org/next-steps/ is a good list of ideas on possible next steps. (But the next steps are not limited to just that list -- you can always come up with your own)!

targos pushed a commit that referenced this pull request May 28, 2019
In posix path.resolve should handle relative paths to be safe
even if process.cwd fails.

At lib/path.js#999:
    return resolvedPath.length > 0 ? resolvedPath : '.';
Else branch wasn't covered.

Add a test case to cover this.

PR-URL: #27905
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
@targos targos mentioned this pull request Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants