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: improve assert messages in test-global · nodejs/node@adcaddf

File tree

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

‎test/parallel/test-global.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-global.js
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ baseFoo = 'foo'; // eslint-disable-line no-undef
3434
global.baseBar = 'bar';
3535

3636
assert.strictEqual(global.baseFoo, 'foo',
37-
'x -> global.x in base level not working');
37+
`x -> global.x failed: global.baseFoo = ${global.baseFoo}`);
3838

3939
assert.strictEqual(baseBar, // eslint-disable-line no-undef
4040
'bar',
41-
'global.x -> x in base level not working');
41+
// eslint-disable-next-line no-undef
42+
`global.x -> x failed: baseBar = ${baseBar}`);
4243

4344
const mod = require(fixtures.path('global', 'plain'));
4445
const fooBar = mod.fooBar;
4546

46-
assert.strictEqual(fooBar.foo, 'foo', 'x -> global.x in sub level not working');
47+
assert.strictEqual(fooBar.foo, 'foo');
4748

48-
assert.strictEqual(fooBar.bar, 'bar', 'global.x -> x in sub level not working');
49+
assert.strictEqual(fooBar.bar, 'bar');
4950

5051
assert.strictEqual(Object.prototype.toString.call(global), '[object global]');

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.