From 129ae016d30031bbb8a9362ab553c035737841a0 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() Adds a second argument to the assert.throws() test to implicitly specify expected error message. --- 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