Skip to content

Commit 784102f

Browse files
superwoodsaddaleax
authored andcommittedJul 18, 2017
test: use regex error checks in test-util-format
Replace constructor with regular expression for second argument to assert.throws() in test-util-format. PR-URL: #14299 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent f9b292c commit 784102f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎test/parallel/test-util-format.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ assert.strictEqual(util.format('%s', symbol), 'Symbol(foo)');
4646
assert.strictEqual(util.format('%j', symbol), 'undefined');
4747
assert.throws(function() {
4848
util.format('%d', symbol);
49-
}, TypeError);
49+
}, /^TypeError: Cannot convert a Symbol value to a number$/);
5050

5151
// Number format specifier
5252
assert.strictEqual(util.format('%d'), '%d');

0 commit comments

Comments
 (0)
Please sign in to comment.