Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: fix the error report on fs.link(Sync) #3917

Closed
wants to merge 2 commits into from
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
add test
  • Loading branch information
yorkie committed Nov 19, 2015
commit 082abaea0d857a6afc7e763d320a8e72a84910be
16 changes: 16 additions & 0 deletions test/parallel/test-fs-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,19 @@ const callback = function(err) {
};

fs.link(srcPath, dstPath, common.mustCall(callback));

// test error outputs

assert.throws(
function() {
fs.link();
},
/src path/
);

assert.throws(
function() {
fs.link('abc');
},
/dest path/
);