Skip to content

Commit adcaddf

Browse files
markmcnelisevanlucas
authored andcommitted
test: improve assert messages in test-global
PR-URL: #16843 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 5f5ef42 commit adcaddf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/parallel/test-global.js

+5-4
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)