Sitelet https://github.com/nodejs/node/pull/11622/commits/214b8dedfeec36dbc539b9e465a5a79d0099aa0a
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
Prev Previous commit
Next Next commit
test: test assertions improvements
  • Loading branch information
clarenced committed Mar 5, 2017
commit 214b8dedfeec36dbc539b9e465a5a79d0099aa0a
16 changes: 9 additions & 7 deletions test/parallel/test-fs-realpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,15 @@ function test_cyclic_link_protection(callback) {
fs.symlinkSync(t[1], t[0], 'dir');
unlink.push(t[0]);
});
assert.throws(function() { fs.realpathSync(entry); }, /^Error: ELOOP/);
asynctest(fs.realpath, [entry], callback, function(err, result) {
assert.ok(err.code === 'ELOOP');
assert.ok(err.path === entry);
assert.ok(result === undefined);
return true;
});
assert.throws(() => {
fs.realpathSync(entry);
}, common.expectsError('ELOOP', Error));
asynctest(
fs.realpath, [entry], callback, common.mustCall(function(err, result) {
assert.ok(err.path === entry);
assert.ok(result === undefined);
return true;
}));
}

function test_cyclic_link_overprotection(callback) {
Expand Down