mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
test: add second argument to assert.throws()
Adds a second argument to the assert.throws() test to implicitly specify expected error message. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
59d2561e18
commit
1377d5ac2e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user