Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: add regex to match error message
  • Loading branch information
clarenced committed Mar 5, 2017
commit e9e90c800457cff05b6135a5292fcb7e3bd55b7c
6 changes: 4 additions & 2 deletions test/parallel/test-fs-realpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,11 @@ function test_cyclic_link_protection(callback) {
fs.symlinkSync(t[1], t[0], 'dir');
unlink.push(t[0]);
});
assert.throws(function() { fs.realpathSync(entry); });
assert.throws(function() { fs.realpathSync(entry); }, /^Error: ELOOP: too many/);
asynctest(fs.realpath, [entry], callback, function(err, result) {
assert.ok(err && true);
assert.ok(err.code === 'ELOOP');
assert.ok(err.path === entry);
assert.ok(result === undefined);
return true;
});
}
Expand Down