Skip to content

Commit

Permalink
made readdir access test more resiliant
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Ramz committed Apr 21, 2020
1 parent 56801da commit f0ce803
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/lib/fs.readdir.spec.js
Expand Up @@ -103,6 +103,7 @@ describe('fs.readdir(path, callback)', function() {
it('calls with an error for restricted path', function(done) {
fs.readdir('denied', function(err, items) {
assert.instanceOf(err, Error);
assert.equal(err.code, 'EACCES');
assert.isUndefined(items);
done();
});
Expand All @@ -118,6 +119,7 @@ describe('fs.readdir(path, callback)', function() {
},
function(err) {
assert.instanceOf(err, Error);
assert.equal(err.code, 'EACCES');
done();
}
);
Expand Down

0 comments on commit f0ce803

Please sign in to comment.