1.0.8 • Published 3 years ago

@art-suite/mock-fs v1.0.8

Weekly downloads
1
License
ISC
Repository
github
Last release
3 years ago

@art-suite/mock-fs

An extension of https://www.npmjs.com/package/mock-fs with one additional method: getTree which returns the current state of the file-system as a hierarchy of objects and strings, exactly the same as the simple format for initializing mock-fs.

let mockFs = require("@art-suite/mock-fs");
let fs = require('fs');

mockFs({
  'README.md':  "# My Markdown",
  'empty-dir':  {} // empty directory
});

fs.writeFileSync(".gitignore", "node_modules/");

mockFs.getTree() == {
  'README.md':  "# My Markdown",
  '.gitignore': "node_modules/",
  'empty-dir':  {} // empty directory
}

mockFs.restore()
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago