From fcc19e163759f3359588d9711af5d95173614ce4 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