test: improve assertion in test-require-dot

Include the value that differed from the expected value in an assertion
message in test-require-dot.

PR-URL: https://github.com/nodejs/node/pull/16805
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Adam Wegrzynek 2017-11-06 16:11:12 +01:00 коммит произвёл Rich Trott
Родитель c3d26e801a
Коммит d520059460
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -14,5 +14,8 @@ process.env.NODE_PATH = fixtures.path('module-require', 'relative');
m._initPaths();
const c = require('.');
assert.strictEqual(c.value, 42, 'require(".") should honor NODE_PATH');
assert.strictEqual(
c.value,
42,
`require(".") should honor NODE_PATH; expected 42, found ${c.value}`
);