summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRj Bernaldo <rj.bernaldo@gmail.com>2017-03-24 15:32:50 +0800
committerFranziska Hinkelmann <franzih@chromium.org>2017-03-26 11:35:00 +0200
commit1377d5ac2e3d47940121a873806a03f13128691a (patch)
treed8078f22ea2ccad7b043da0b003ec51b182edfeb /test
parent59d2561e18b065fb8ea9492398103d993d90e177 (diff)
downloadandroid-node-v8-1377d5ac2e3d47940121a873806a03f13128691a.tar.gz
android-node-v8-1377d5ac2e3d47940121a873806a03f13128691a.tar.bz2
android-node-v8-1377d5ac2e3d47940121a873806a03f13128691a.zip
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>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-util-inspect-proxy.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-util-inspect-proxy.js b/test/parallel/test-util-inspect-proxy.js
index 744bf23526..a6afc9f9bf 100644
--- a/test/parallel/test-util-inspect-proxy.js
+++ b/test/parallel/test-util-inspect-proxy.js
@@ -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