testfs

Easily create files under a prefix for testing fs modules

npm install testfs
3 downloads in the last week
12 downloads in the last month

testfs

Easily create files under a prefix for testing fs modules.

build status dependency status dev dependency status

npm

Example

var testfs = require('testfs');
var exec = require('child_process').exec;

var fixtures = [
  '1.txt',
  'sub/subsub/2.txt',
  'sub/subsub2/',
  '1.txt -> l.txt',
  '../1.txt -> sub/l.txt'
];

testfs('example', fixtures, function (err, rm) {
  exec('find | wc -l', function (err, stdout, stderr) {
    console.log(stdout);

    rm(function (err) {
      exec('find | wc -l', function (err, stdout, stderr) {
        console.log(stdout);
      });
    });
  });
});

License

MIT

npm loves you