You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the standard fs module, the follow will work:
var fs = require('fs');
var stat = fs.stat;
stat('/var/www', function (err, stats) {
})
However, when using fs-mock, an error will get thrown because the method loses its context and most of the methods make use of this.
I believe the fix would be to change the thin arrows -> on the fs methods in fs.coffee to be fat arrows => so that they stay bound to the correct object.
The text was updated successfully, but these errors were encountered:
Hi and thanks for writing that issue. This should be solved in next version which will be writen in pure javascript. Unfortenately I don't have any free time right now, so hopefuly next week..
When using the standard
fs
module, the follow will work:However, when using
fs-mock
, an error will get thrown because the method loses its context and most of the methods make use ofthis
.I believe the fix would be to change the thin arrows
->
on the fs methods infs.coffee
to be fat arrows=>
so that they stay bound to the correct object.The text was updated successfully, but these errors were encountered: