diff --git a/test/lib/fs.readdir.spec.js b/test/lib/fs.readdir.spec.js index fde648aa..5b531c30 100644 --- a/test/lib/fs.readdir.spec.js +++ b/test/lib/fs.readdir.spec.js @@ -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(); }); @@ -118,6 +119,7 @@ describe('fs.readdir(path, callback)', function() { }, function(err) { assert.instanceOf(err, Error); + assert.equal(err.code, 'EACCES'); done(); } );