Closed twawszczak closed 5 years ago
If anyone has any good ideas on how to solve this I'd be willing to put in a PR.
I've opened #240 which fixes the issues with stat
/fstat
/lstat
but there is a second set of problems with createReadStream
and createWriteStream
which I have not been able to find a fix for so far.
Basically the problem is that after restoring the mocked fs and then starting a new one writing to a stream created against the new mock fs will wind up calling back into writeBuffers
with an fd from the new context but with this
bound to the old context which leads the fd not being found. I have so far been unable to determine exactly why however...
Stat calls now work (thanks @tomhughes). I need to do more debugging to figure out how to handle the read after open.
Any progress?
@tschaub @tomhughes any news on solving the streams bug in Node v10.5+? This just become urgent for my current use case
This should be addressed on the 4.8.0 release (thanks @huochunpeng, see #260).
after fs module refactors and changes