Open andrewnicols opened 1 year ago
I am also facing issues on Node 20 with exists*
.
This pushed me to just use async methods instead of *Sync
. Those work perfectly in Node 20 with mock-fs
🎉
This pushed me to just use async methods instead of
*Sync
. Those work perfectly in Node 20 withmock-fs
🎉
Thanks @fregante! This works!
Mocking with
mock-fs
and callfs.statSync
no longer mocks from v20.8.0 https://nodejs.org/en/blog/release/v20.8.0I believe this is due to performance improvements in fs.*Sync methods from this commit: https://github.com/nodejs/node/pull/49593/files#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
All *Sync commans hae moved to syncFs.