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

lib, test: migrate _http_outgoing.js's remaining errors to internal/errors.js #17837

Closed
wants to merge 3 commits into from
Closed

lib, test: migrate _http_outgoing.js's remaining errors to internal/errors.js #17837

wants to merge 3 commits into from

Commits on Dec 23, 2017

  1. lib: migrate _http_outgoing.js's remaining errors

    A couple of lib/_http_outgoing.js's errors were still in the
    "old style": `throw new Error(<some message here>)`.
    
    This commit migrates those 2 old style errors to the "new style":
    internal/errors.js's error-system.
    
    In the future, changes to these errors' messages won't break
    semver-major status. With the old style, changes to these errors'
    messages broke semver-major status. It was inconvenient.
    
    Refs: #17709
    b0yfriend committed Dec 23, 2017
    Configuration menu
    Copy the full SHA
    55c3619 View commit details
    Browse the repository at this point in the history
  2. test: adapt _http_outgoing.js tests to new errors

    Two of _http_outgoing.js's errors were migrated to
    the internal/errors.js system. This commit
    adapts _http_outgoing.js's tests accordingly.
    
    Refs: #17709
    b0yfriend committed Dec 23, 2017
    Configuration menu
    Copy the full SHA
    6ba656c View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2017

  1. test: simplify _http_outgoing.js's error tests

    _http_outgoing.js's tests perform error-checks. They ensure that
    appropriate errors are thrown in the appropriate circumstances.
    
    A few error-checks were bloated. They used unnecessary intermediate
    functions. E.g. there were unnecessary combinations of
    `common.mustCall()` & `common.expectsError()` and
    `common.expectsError()` & `assert.throws()`.
    
    This commit removes those unnecessary intermediate functions.
    This simplifies the given error-checks.
    b0yfriend committed Dec 24, 2017
    Configuration menu
    Copy the full SHA
    1ce4197 View commit details
    Browse the repository at this point in the history