Skip to content

Commit 86a8293

Browse files
committed
[Tests] better failure messages
1 parent 87e954a commit 86a8293

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/node_path.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var test = require('tape');
44
var resolve = require('../');
55

66
test('$NODE_PATH', function (t) {
7-
t.plan(4);
7+
t.plan(8);
88

99
var isDir = function (dir, cb) {
1010
if (dir === '/node_path' || dir === 'node_path/x') {
@@ -27,6 +27,7 @@ test('$NODE_PATH', function (t) {
2727
basedir: __dirname,
2828
isDirectory: isDir
2929
}, function (err, res) {
30+
t.error(err);
3031
t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves');
3132
});
3233

@@ -38,6 +39,7 @@ test('$NODE_PATH', function (t) {
3839
basedir: __dirname,
3940
isDirectory: isDir
4041
}, function (err, res) {
42+
t.error(err);
4143
t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves');
4244
});
4345

@@ -49,6 +51,7 @@ test('$NODE_PATH', function (t) {
4951
basedir: __dirname,
5052
isDirectory: isDir
5153
}, function (err, res) {
54+
t.error(err);
5255
t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves');
5356
});
5457

@@ -61,6 +64,7 @@ test('$NODE_PATH', function (t) {
6164
isDirectory: isDir
6265
}, function (err, res) {
6366
var root = require('tap/package.json').main;
67+
t.error(err);
6468
t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
6569
});
6670
});

0 commit comments

Comments
 (0)