Skip to content

Commit

Permalink
test: improve assertion in test-require-dot
Browse files Browse the repository at this point in the history
Include the value that differed from the expected value in an assertion
message in test-require-dot.

PR-URL: #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>
  • Loading branch information
awegrzyn authored and evanlucas committed Nov 13, 2017
1 parent 25dd8f6 commit 271c89e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/parallel/test-require-dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
);

0 comments on commit 271c89e

Please sign in to comment.