Skip to content

Commit

Permalink
Outside the root we return ENOENT instead of EACCESS
Browse files Browse the repository at this point in the history
- A change of expected error code in case resolving file outside of root
  • Loading branch information
exsilium committed Dec 29, 2023
1 parent e66b371 commit e96040b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test-local.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('vfs-local', function () {
});
it('should reject paths that resolve outside the root', function (done) {
vfs.resolve("/../test-local.js", {}, function (err, meta) {
expect(err).property("code").equals("EACCESS");
expect(err).property("code").equals("ENOENT");
done();
});
});
Expand Down

0 comments on commit e96040b

Please sign in to comment.