From 1377d5ac2e3d47940121a873806a03f13128691a Mon Sep 17 00:00:00 2001 From: Rj Bernaldo Date: Fri, 24 Mar 2017 15:32:50 +0800 Subject: [PATCH] test: add second argument to assert.throws() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Vse Mozhet Byt Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Franziska Hinkelmann --- test/parallel/test-util-inspect-proxy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-util-inspect-proxy.js b/test/parallel/test-util-inspect-proxy.js index 744bf235266e86..a6afc9f9bf9bad 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