-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Reporting never ends with mock-fs #324
Comments
@matheuss the last two times that we fixed this, it related to bundling using any help that anyone can provide debugging this gnarly bug, would be greatly appreciated! CC: @novemberborn, @jamestalmage, @addaleax:
I think it relates to a shared library, and singleton behavior -- this is a hunch. |
I'm using HyperTerm and it is, sometimes when I run Through
I think that in #205 or #246 I saw something about |
That last one looks like a race condition in the file watcher or in HyperTerm. |
diff --git a/test/test.js b/test/test.js
index 762caa68f1a6..4d5941ff8906 100644
--- a/test/test.js
+++ b/test/test.js
@@ -2,9 +2,12 @@ import {homedir} from 'os';
import test from 'ava';
-require('mock-fs')({
+const mockfs = require('mock-fs')
+mockfs({
[`${homedir()}/.hyperterm.js`]: 'module.exports = {plugins: []};'
});
+test.after(() => mockfs.restore());
+
require('mock-require')(`${require('os').homedir()}/.hyperterm.js`, './_hyperterm-mocker');
const api = require('../hyperterm'); should fix it, at least for your test case. And yeah, sorry, but I don’t think this is something related to There are two solutions for working with |
Thanks @addaleax! Fixed for me! Never thought of that. Now with the solution and with what you say, makes sense to state that is not something from
This is absolutely necessary. I'll submit a PR. |
If someone wanted to take the time to implement tschaub/mock-fs#142, that would solve a lot of headaches as well. |
I've seen #246 and #205. Both are closed, but I'm facing this issue right now 😩
Notice the
^ C
.My code: https://github.com/matheuss/hpm/blob/master/test/test.js
The text was updated successfully, but these errors were encountered: