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

assert: ensure .rejects() disallows sync throws #19650

Closed

Commits on Mar 28, 2018

  1. test: ensure failed assertions cause build to fail

    This updates the test in `test/parallel/test-assert-async.js` to add an
    assertion that the Promises used in the test end up fulfilled.
    Previously, if an assertion failure occurred, the Promises would have
    rejected and a warning would have been logged, but the test would still
    have exit code 0.
    not-an-aardvark committed Mar 28, 2018
    Copy the full SHA
    4774af1 View commit details
    Browse the repository at this point in the history
  2. assert: ensure .rejects() disallows sync throws

    This updates `assert.rejects()` to disallow any errors that are thrown
    synchronously from the given function. Previously, throwing an error
    would cause the same behavior as returning a rejected Promise.
    
    Fixes: nodejs#19646
    not-an-aardvark committed Mar 28, 2018
    Copy the full SHA
    75d2d1e View commit details
    Browse the repository at this point in the history