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 71c11d6

Browse filesBrowse files
markmcnelisMylesBorins
authored andcommitted
test: improve assert messages in test-global
PR-URL: #16843 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent eafc0a1 commit 71c11d6
Copy full SHA for 71c11d6

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+5
-4
lines changed
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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.