Open josiah14 opened 9 years ago
I am seeing this error at fs.write
in one setup of Windows 7.
Also a similar EBADF
error in a Windows 8 setup, though from fs.close
.
Also having this problem when using fs.readFileSync
on Linux.
Error: EBADF, bad file descriptor
at Binding.<anonymous> (node_modules/mock-fs/lib/binding.js:343:13)
at maybeCallback (node_modules/mock-fs/lib/binding.js:41:17)
at Binding.read (node_modules/mock-fs/lib/binding.js:335:10)
at Object.fs.readSync (node_modules/mock-fs/node/fs-6.0.0.js:651:19)
at Object.fs.readFileSync (node_modules/mock-fs/node/fs-6.0.0.js:472:24)
On Windows 7, I'm getting EBADF too. Just calling mock()
throws this error. Also, mock({'path/to/dir': {}})
throws same error.
What node versions are you all running? I get this on 10, but not on 8.
It seems mock-fs can't create the mock filesystem correctly in ElementaryOS??? This code works fine on OSX.
Mocha and Chai.expect are being used, here.
The test:
The error