Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fcc19e1

Browse filesBrowse files
rjbernaldoMylesBorins
authored andcommitted
test: add second argument to assert.throws()
Adds a second argument to the assert.throws() test to implicitly specify expected error message. PR-URL: #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>
1 parent b69cac7 commit fcc19e1
Copy full SHA for fcc19e1

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-util-inspect-proxy.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect-proxy.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ assert.strictEqual(processUtil.getProxyDetails({}), undefined);
3131
// and the get function on the handler object defined above
3232
// is actually invoked.
3333
assert.throws(
34-
() => util.inspect(proxyObj)
34+
() => util.inspect(proxyObj),
35+
/^Error: Getter should not be called$/
3536
);
3637

3738
// Yo dawg, I heard you liked Proxy so I put a Proxy

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.