fs mixins for sinon-doublist:
sinonsandboxes except fake timers will be created by the both mixin approaches below. (sinon docs)
/*** /root/a* /root/a/b* /root/a/b2* /root/a2* /root/a3* /root/a3/b4* /root/a3/b4/c*/this;
Creates the same hierarchy as the
stubFile()example above. However, ancestor directories are stubbed automatically.
File stubs created by
stubFile() / stubTree(), and configured via
.stat() and others, will be reflected/modifiable by:
fs.stat* / fs.lstat*
isFile() / isDirectory()responses
If a file stub does not exist for a given path, we fallback to the real
fs method. To override this behavior:
sinonDoublistFs.realFsFallback = 0
sinonDoublistFs.realFsFallback = 2
existsSync, no such file stub '/path/to/file'
co-fs wrappers just need to be added after
sinon-doublist-fs stubbing. See test/lib/co-fs.js.
npm install sinon-doublist-fs