tschaub / mock-fs

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

FSError missing `path` property #229

Closed deployable closed 6 years ago

deployable commented 6 years ago

Some fs errors have a path property on the error, which is missing when mock-fs throws

> try { fs.readdirSync('/asdf') } catch (e) { console.log(e.path) }
/asdf

> require('mock-fs')()

> try { fs.readdirSync('/asdf') } catch (e) { console.log(e.path) }
undefined
deployable commented 6 years ago

syscall is missing too but I guess that is a bit harder to take a guess at