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:
Родитель
c3d26e801a
Коммит
d520059460
|
@ -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}`
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче