-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Watch mode crashes with ProcessTerminatedError in new test pattern mode #2979
Comments
I think it was not introduced in Jest 19, I can repro it in the React's master branch which is still using Jest 18.0.0 |
React master definitely uses Jest 19: facebook/react#9034. |
Oh sorry, I was in an "old" master 😞 Yeah is was added in Jest 16 as a CLI flag |
but and after some magic I catch this
|
01: it('should not crash ensureScrollValueMonitoring when createEvent returns null', () => {
02: var originalCreateEvent = document.createEvent;
03: document.createEvent = function() {
04: return null;
05: };
06: spyOn(document, 'createEvent');
07:
08: try {
09: var hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
10: expect(document.createEvent.calls.count()).toBe(1);
11: expect(hasEventPageXY).toBe(false);
12: } finally {
13: document.createEvent = originalCreateEvent;
14: }
15: }); @gaearon I think test crashed because at 03-06 lines |
Interesting. In any case, even if the failure is on jsdom's side, the watch mode shouldn't crash and exit. The problem is not just that the test fails, but that it also brings down the watcher. |
This is definitely odd and Jest shouldn't crash in this case. |
Yep, I agree |
I just ran
and I could not reproduce the crashing - fixed by accident somewhere else? |
I can't repro this with Jest on master. |
Can reproduce this after upgrading from 18.1.0 to 20.1.0-delta.3 |
|
Please use the 21.0.0 alphas. |
Same error with 21.0.0.alpha.2:
|
Can you provide a reproducing case? |
I've got the same problem with
|
@sospedra Please provide a reproducing case for folks can look into it. |
Yeah, it's always reproducible on one test case. Will try to isolate the problem next week |
Follow up. I'm trying to make a repro case but Edit: More research. It's definetely something related to the Edit 2: Ok. So I can confirm that's a timer issue. Becaue when I set |
No, I don't have "timers": "fake" in my jest config. |
I think I found the secret combination:
|
For some peculiar reason, if virtual DOM contains at least 2 elements with |
just got same error on
and function it tests is just joining some stuff
and getEnv is:
"jest": "^21.1.0", |
Any updates on this? :) |
Getting this issue in our app with react-native while running tests. Adding: |
Try adding
|
Currently getting this error here. Adding:
to "jest" doesn't fix, nor does adding EDIT: Fixing some dependencies solved my problem but I'm not sure wh . |
If anybody can create a reproduction, please open up a new issue and link to this |
I received this error when I was using |
This did it for me: ref
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The watch mode crashes:
If I just run
npm test -- --watch ReactBrowserEventEmitter
I can't reproduce this.The text was updated successfully, but these errors were encountered: