From 76118694bf30719e1c44be9321d0b6ac669d3ce7 Mon Sep 17 00:00:00 2001 From: "David Humphrey (:humph) david.humphrey@senecacollege.ca" Date: Sun, 17 Aug 2014 15:12:08 -0400 Subject: [PATCH] Failing test --- tests/bugs/issue254.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/bugs/issue254.js diff --git a/tests/bugs/issue254.js b/tests/bugs/issue254.js new file mode 100644 index 0000000..0d595fb --- /dev/null +++ b/tests/bugs/issue254.js @@ -0,0 +1,17 @@ +var Filer = require('../..'); +var util = require('../lib/test-utils.js'); +var expect = require('chai').expect; + +describe('fs.readFile on a dir path', function() { + beforeEach(util.setup); + afterEach(util.cleanup); + + it('should fail with EISDIR', function(done) { + var fs = util.fs(); + + fs.readFile('/', function(err) { + expect(err.code).to.equal('EISDIR'); + done(); + }); + }); +});