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 0bd0d52

Browse filesBrowse files
TheLadyMylesBorins
authored andcommitted
test: replace assertion error check with regex
PR-URL: #12603 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent 8044b83 commit 0bd0d52
Copy full SHA for 0bd0d52

File tree

Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-v8-flag-type-check.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-v8-flag-type-check.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ require('../common');
33
const assert = require('assert');
44
const v8 = require('v8');
55

6-
assert.throws(function() { v8.setFlagsFromString(1); }, TypeError);
7-
assert.throws(function() { v8.setFlagsFromString(); }, TypeError);
6+
assert.throws(function() { v8.setFlagsFromString(1); },
7+
/^TypeError: v8 flag must be a string$/);
8+
assert.throws(function() { v8.setFlagsFromString(); },
9+
/^TypeError: v8 flag is required$/);
Collapse file

‎test/parallel/test-v8-flags.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-v8-flags.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ assert(eval('%_IsSmi(42)'));
1212
assert(vm.runInThisContext('%_IsSmi(43)'));
1313

1414
v8.setFlagsFromString('--noallow_natives_syntax');
15-
assert.throws(function() { eval('%_IsSmi(44)'); }, SyntaxError);
16-
assert.throws(function() { vm.runInThisContext('%_IsSmi(45)'); }, SyntaxError);
15+
assert.throws(function() { eval('%_IsSmi(44)'); },
16+
/^SyntaxError: Unexpected token %$/);
17+
assert.throws(function() { vm.runInThisContext('%_IsSmi(45)'); },
18+
/^SyntaxError: Unexpected token %$/);

0 commit comments

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