From adcaddfce88aa37e7b9a351677189455f1461dce Mon Sep 17 00:00:00 2001 From: Mark McNelis Date: Mon, 6 Nov 2017 18:22:57 +0000 Subject: [PATCH] test: improve assert messages in test-global PR-URL: https://github.com/nodejs/node/pull/16843 Reviewed-By: Gireesh Punathil Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- test/parallel/test-global.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js index 2300fd1051dd0c..46db72eeceb586 100644 --- a/test/parallel/test-global.js +++ b/test/parallel/test-global.js @@ -34,17 +34,18 @@ baseFoo = 'foo'; // eslint-disable-line no-undef global.baseBar = 'bar'; assert.strictEqual(global.baseFoo, 'foo', - 'x -> global.x in base level not working'); + `x -> global.x failed: global.baseFoo = ${global.baseFoo}`); assert.strictEqual(baseBar, // eslint-disable-line no-undef 'bar', - 'global.x -> x in base level not working'); + // eslint-disable-next-line no-undef + `global.x -> x failed: baseBar = ${baseBar}`); const mod = require(fixtures.path('global', 'plain')); const fooBar = mod.fooBar; -assert.strictEqual(fooBar.foo, 'foo', 'x -> global.x in sub level not working'); +assert.strictEqual(fooBar.foo, 'foo'); -assert.strictEqual(fooBar.bar, 'bar', 'global.x -> x in sub level not working'); +assert.strictEqual(fooBar.bar, 'bar'); assert.strictEqual(Object.prototype.toString.call(global), '[object global]');