Skip to content

Commit 16b2846

Browse files
authored
Merge pull request #391 from everett1992/mock.fs
remove disabled tests for mock.fs
2 parents 3e39479 + 40383c9 commit 16b2846

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

test/lib/index.spec.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -344,50 +344,6 @@ describe('The API', function () {
344344
});
345345
});
346346
});
347-
348-
xdescribe('mock.fs()', function () {
349-
it('generates a mock fs module with a mock file system', function (done) {
350-
const mockFs = mock.fs({
351-
'path/to/file.txt': 'file content',
352-
});
353-
354-
mockFs.exists('path/to/file.txt', function (exists) {
355-
assert.isTrue(exists);
356-
done();
357-
});
358-
});
359-
360-
it('passes options to the FileSystem constructor', function () {
361-
const mockFs = mock.fs(
362-
{
363-
'/path/to/file.txt': 'file content',
364-
},
365-
{
366-
createCwd: false,
367-
createTmp: false,
368-
}
369-
);
370-
371-
assert.isTrue(mockFs.existsSync('/path/to/file.txt'));
372-
assert.deepEqual(mockFs.readdirSync('/'), ['path']);
373-
});
374-
375-
it('accepts an arbitrary nesting of files and directories', function () {
376-
const mockFs = mock.fs({
377-
'dir-one': {
378-
'dir-two': {
379-
'some-file.txt': 'file content here',
380-
},
381-
},
382-
'empty-dir': {},
383-
});
384-
385-
assert.isTrue(mockFs.existsSync('dir-one/dir-two/some-file.txt'));
386-
assert.isTrue(mockFs.statSync('dir-one/dir-two/some-file.txt').isFile());
387-
assert.isTrue(mockFs.statSync('dir-one/dir-two').isDirectory());
388-
assert.isTrue(mockFs.statSync('empty-dir').isDirectory());
389-
});
390-
});
391347
});
392348

393349
describe('process.cwd()', function () {

0 commit comments

Comments
 (0)