-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't seem to work with node 10 fs.promises #245
Comments
The last version of Node this worked on was 10.4.1 |
Confirming this may be reproduced on [email protected] and [email protected]. Any insight about what's causing this issue and when it will be fixed? |
I'm getting a similar issue. I can successfully read the mock files using const fs = require('fs').promises
// inside async function
const content = await fs.readFile(file, 'utf8') it always throws:
I'm using [email protected], [email protected] and [email protected]. |
So a little insight into what's causing the issue:
[NOTE: This is being phased out entirely in Node 11 due to the deprecation of bindings] The You can see the javascript-land code for The biggest change is that there's a symbol passed in to the callback param of the Binding function called Feel free to take a crack at it and open a PR! |
@maxwellgerber Thanks for the info! If I can find some free time soon I'll look into that. The weird thing is that I have another test suite that's using |
This should be addressed on the 4.8.0 release (thanks @huochunpeng, see #260). |
to prepare for node v10 upgrade: tschaub/mock-fs#245 for #199
This fixes all tests on my machine, there was previously an issue with mock-fs with fs.promises that was affecting our tests. tschaub/mock-fs#245 Let's 🙏 this fixes the broken tests on CircleCI.
Produces:
EBADF, bad file descriptor
While
fs.readFileSync('test', 'utf8')
works correctly.node: 10.6.0
mock-fs: 4.6.0
The text was updated successfully, but these errors were encountered: