fs-mock auto-creates the all the directories in between (i.e., /, /var, /var/www). However, the root directory / gets created as a file instead of a directory.
The following test fails:
it 'should create root directory', ->
fs = new FS(
'var/www/index.php': ''
)
expect(fs.statSync('/').isDirectory()).to.be.true
When you define a file structure such as:
fs-mock
auto-creates the all the directories in between (i.e.,/, /var, /var/www
). However, the root directory/
gets created as a file instead of a directory.The following test fails: