Skip to content

Commit adcaddf

Browse files
markmcnelisevanlucas
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 5f5ef42 commit adcaddf

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎test/parallel/test-global.js‎

Lines 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
constmod=require(fixtures.path('global','plain'));
4445
constfooBar=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)