GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix check error name on error instance · nodejs/node@6d47958

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-worker-syntax-error-file.js
    • test-worker-syntax-error.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-worker-syntax-error-file.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-worker-syntax-error-file.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (!process.env.HAS_STARTED_WORKER) {
1111
w.on('message', common.mustNotCall());
1212
w.on('error', common.mustCall((err) => {
1313
assert.strictEqual(err.constructor, SyntaxError);
14-
assert(/SyntaxError/.test(err));
14+
assert.strictEqual(err.name, 'SyntaxError');
1515
}));
1616
} else {
1717
throw new Error('foo');
Collapse file

‎test/parallel/test-worker-syntax-error.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-worker-syntax-error.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ const w = new Worker('abc)', { eval: true });
77
w.on('message', common.mustNotCall());
88
w.on('error', common.mustCall((err) => {
99
assert.strictEqual(err.constructor, SyntaxError);
10-
assert(/SyntaxError/.test(err));
10+
assert.strictEqual(err.name, 'SyntaxError');
1111
}));

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.