Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: add second argument to assert.throws()
Adds a second argument to the assert.throws() test to implicitly specify
expected error message.
  • Loading branch information
rjbernaldo committed Mar 24, 2017
commit 129ae016d30031bbb8a9362ab553c035737841a0
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