-
Notifications
You must be signed in to change notification settings - Fork 306
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
fakeAsync doesn't work #65
Comments
any update here? any clue? |
Haven't tested this yet, but I remember |
@thymikee fakeAsync is doing its job flushing promises, but looks like is having hard time flushing timers, not sure why. but this is an example too |
Alternative repro steps @thymikee:
Note that the same test (with the same dependencies) passes when using webpack + karma + Chrome headless. |
I'm having this same issue, my tests are failing because I'm requiring the use of a setTimeout to get certain behavior in the UI and these behaviors aren't being picked up by Jest until after the test has failed. |
I won't be able to verify it in following days, would appreciate some help on this in the meantime. |
Thanks @Waldo000000, I've confirmed it works with zone 0.8.10, but breaks since 0.8.11. I've also been able to track the change, which I think is a bug, but who knows. I've asked about that in the relevant PR which introduced the change. Any help on this appreciated. Temporary solution: lock down zone.js to 0.8.10 |
I have a fix for that, which involves using newer version of |
Hey folks, I've just released |
The fakeAsync test now passes in my test repo. Thank you very much! 🎉 |
I'm using jest-preset-angular@5.0 and zone@0.8.2 and fakeAsync still fails for me |
@tkstang I'm using jest-preset-angualr@5.0 and zone@0.8.19, fakeAsync works fine for me. Can you try updating zone ? |
0.8.20 is more up to date than 0.8.19 is it not? |
I haven't tried 0.8.20 yet but fakeAsync works for me at 0.8.19. Perhaps you can try 0.8.19 1st to see |
Hi, I'm currently facing the exact same issue with My test is broken and then it ends up with
@thymikee might be worth reopening the issue as it seems I'm not the only one recently to have that issue |
Steps to reproduce:
yarn
andyarn jest
and note that the fakeAsync test failsNote that
yarn test
, which uses Karma, passes.The text was updated successfully, but these errors were encountered: