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

Mock Files Not Found When Importing Mock-Fs Multiple Times In Other Test Files #316

Open
bushmecj opened this issue Dec 15, 2020 · 1 comment

Comments

@bushmecj
Copy link

bushmecj commented Dec 15, 2020

When testing a function whose job is to open files, the test will fail if another test file imports mock-fs.

I receive the following error:
Error: UNKNOWN: unknown error, open MOCKED-FILE-PATH-HERE

This error disappears and the test passes when I comment out the mock-fs import in another file. The other file simply needs to import mock-fs. It does not need to actually use the package for the tests to fail.

@3cp
Copy link
Collaborator

3cp commented Dec 19, 2020

It is very common to import mock-fs in multiple test files, pls share a minimal repo to reproduce the issue.

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

2 participants