Skip to content

Commit

Permalink
test: add second argument to assert.throws()
Browse files Browse the repository at this point in the history
Adds a second argument to the assert.throws() test to implicitly specify
expected error message.

PR-URL: nodejs/node#12016
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information
rjbernaldo authored and andrew749 committed Jul 19, 2017
1 parent 69d7ac8 commit 9c7840a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-util-inspect-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ assert.strictEqual(processUtil.getProxyDetails({}), undefined);
// and the get function on the handler object defined above
// is actually invoked.
assert.throws(
() => util.inspect(proxyObj)
() => util.inspect(proxyObj),
/^Error: Getter should not be called$/
);

// Yo dawg, I heard you liked Proxy so I put a Proxy
Expand Down

0 comments on commit 9c7840a

Please sign in to comment.