Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: dump mock file system for easy inspection #90

Closed
abelnation opened this issue Feb 20, 2016 · 3 comments
Closed

Request: dump mock file system for easy inspection #90

abelnation opened this issue Feb 20, 2016 · 3 comments

Comments

@abelnation
Copy link

a method like mockFs.dump() would be nice for debugging/inspecting

@jprichardson
Copy link

You can do this by getting the binding.

Example:

var mockfs = require('mock-fs')
var fs = mockfs.fs()
var binding = fs.__get__('binding')
console.dir(binding._system._root)

@ciaranj
Copy link
Contributor

ciaranj commented Jan 26, 2017

As far as I can tell this only works for mockfs.fs, rather than mockfs(). Is that intentional?

@tschaub
Copy link
Owner

tschaub commented Feb 5, 2017

This was fixed by @ciaranj in #194 and is included in the mock-fs@4 release.

@tschaub tschaub closed this as completed Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants