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: #12016
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
  • Loading branch information
rjbernaldo authored and MylesBorins committed Apr 19, 2017
1 parent b69cac7 commit fcc19e1
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 fcc19e1

Please sign in to comment.