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

Refactor: Use common.expectsError in tests #17497

Closed
wants to merge 1 commit into from
Closed

Refactor: Use common.expectsError in tests #17497

wants to merge 1 commit into from

Conversation

mithunsasidharan
Copy link
Contributor

@mithunsasidharan mithunsasidharan commented Dec 6, 2017

Refactored tests to replace assert.throws(fn, common.expectsError(err)); with common.expectsError(fn, err); in following test files :

  • test/parallel/test-dns.js
  • test/parallel/test-fs-realpath.js
  • test/parallel/test-fs-watchfile.js
  • test/parallel/test-http-client-check-http-token.js
  • test/parallel/test-http-client-reject-unexpected-agent.js
  • test/parallel/test-http-client-unescaped-path.js
  • test/parallel/test-http-hostname-typechecking.js
  • test/parallel/test-http-request-invalid-method-error.js
  • test/parallel/test-http-response-statuscode.js
  • test/parallel/test-http-server-de-chunked-trailer.js
  • test/parallel/test-http-write-head.js
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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 6, 2017
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM but the commit message should start with the test subsystem.

@apapirovski
Copy link
Member

apapirovski commented Dec 6, 2017

@mithunsasidharan FWIW, feel free to just open one big pull request if you're doing this for the rest of the tests. It will make it easier to land it and it's really not that hard to review, even if it's 100+ files.

(Less to keep track of for backports too.)

@cjihrig
Copy link
Contributor

cjihrig commented Dec 6, 2017

Also, be prepared to backport all of these PRs to other release lines.

@maclover7
Copy link
Contributor

@apapirovski
Copy link
Member

Landed in acd4277

@apapirovski apapirovski closed this Dec 8, 2017
apapirovski pushed a commit that referenced this pull request Dec 8, 2017
PR-URL: #17497
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17497
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17497
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 12, 2017
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants