tschaub / mock-fs

Configurable mock for the fs module
https://npmjs.org/package/mock-fs
Other
906 stars 85 forks source link

chore: cleanup tests and small fix on mockfs.bypass #320

Closed 3cp closed 3 years ago

3cp commented 3 years ago

I was planning to use this branch to implement fs.opendir, but it seems Nodejs would not open up access to internal binding fs_dir https://github.com/nodejs/node/issues/37746#issuecomment-798809618

This PR fixes mockfs.bypass support of Promise on old Nodejs versions where Promise.prototype.finally is not available. Also cleaned up the tests.

tschaub commented 3 years ago

Looks good to me. Thanks, @3cp.