Skip to content

Commit a73dea9

Browse files
rjbernaldoMylesBorins
authored andcommittedMar 28, 2017
test: add second argument to assert.throws()
Adds a second argument to the assert.throws() test to implicitly specify expected error message. PR-URL: #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>
1 parent 837ff4b commit a73dea9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎test/parallel/test-util-inspect-proxy.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ assert.strictEqual(processUtil.getProxyDetails({}), undefined);
3131
// and the get function on the handler object defined above
3232
// is actually invoked.
3333
assert.throws(
34-
() => util.inspect(proxyObj)
34+
() => util.inspect(proxyObj),
35+
/^Error: Getter should not be called$/
3536
);
3637

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

0 commit comments

Comments
 (0)
Please sign in to comment.