FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: add cases for unescape & unescapeBuffer by watilde · Pull Request #11326 · nodejs/node · GitHub

/ node Public

test: add cases for unescape & unescapeBuffer - #11326

Closed
watilde wants to merge 1 commit into
nodejs:masterfrom
watilde:test-qs
Closed

test: add cases for unescape & unescapeBuffer#11326
watilde wants to merge 1 commit into
nodejs:masterfrom
watilde:test-qs

Conversation

watilde commented Feb 12, 2017
edited
Loading

Copy link
Copy Markdown
Member

Increase coverage of querystring:

This test case will cover these lines:

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

test, querystring

nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 12, 2017
mscdex added the querystring Issues and PRs related to the built-in querystring module. label Feb 12, 2017
Comment thread test/parallel/test-querystring.js Outdated

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'd prefer having more direct tests against qs.unescapeBuffer() in addition to the indirect ones for qs.unescape(). Here are some nice test cases for unescapeBuffer().

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for pointing them! I've picked them and updated the test.

hiroppy commented Feb 12, 2017

Copy link
Copy Markdown
Member

jasnell commented Feb 16, 2017

Copy link
Copy Markdown
Member

@TimothyGu ... PTAL

Copy link
Copy Markdown
Member

@watilde, sorry for not being clear. What I meant is calling qs.unescapeBuffer() directly, i.e. not though qs.unescape().

watilde commented Feb 17, 2017

Copy link
Copy Markdown
Member Author

@TimothyGu To test this line, I needed calling qs.unescape() instead of qs.unescapeBuffer() to make an error by passing an option { decodeURIComponent: errDecode }.

Copy link
Copy Markdown
Member

@watilde, how about both?

These two functions in the querystring are used as a fallback.
To test them, two test cases were added which make errors that
will be caught.

watilde commented Feb 17, 2017

Copy link
Copy Markdown
Member Author

@TimothyGu Ahh that's nice! I will add it to call the both methods.

watilde commented Feb 17, 2017

Copy link
Copy Markdown
Member Author

Updates:

mhdawson 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Member

jasnell pushed a commit that referenced this pull request Feb 19, 2017
These two functions in the querystring are used as a fallback.
To test them, two test cases were added which make errors that
will be caught.

PR-URL: #11326
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

hiroppy commented Feb 25, 2017

Copy link
Copy Markdown
Member

landed in 02acea9

hiroppy closed this Feb 25, 2017
watilde deleted the test-qs branch February 25, 2017 16:08
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 25, 2017
These two functions in the querystring are used as a fallback.
To test them, two test cases were added which make errors that
will be caught.

PR-URL: nodejs#11326
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
italoacasas mentioned this pull request Feb 25, 2017
jasnell pushed a commit that referenced this pull request Mar 7, 2017
These two functions in the querystring are used as a fallback.
To test them, two test cases were added which make errors that
will be caught.

PR-URL: #11326
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

jasnell commented Mar 7, 2017

Copy link
Copy Markdown
Member

This will need a backport PR if it needs to land on v4.x-staging

MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
These two functions in the querystring are used as a fallback.
To test them, two test cases were added which make errors that
will be caught.

PR-URL: #11326
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins mentioned this pull request Mar 9, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

querystring Issues and PRs related to the built-in querystring module. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL