Mocking with `mock-fs` and call `fs.statSync` no longer mocks from v20.8.0 https://nodejs.org/en/blog/release/v20.8.0 I 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.