Skip to content

Refactor: Use common.expectsError in tests

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

Merge request reports

Loading