question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fakeAsync doesn't work

See original GitHub issue

Steps to reproduce:

  1. Clone this repo.
  2. Run yarn and yarn jest and note that the fakeAsync test fails

Note that yarn test, which uses Karma, passes.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
thymikeecommented, Oct 1, 2017

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

1reaction
tkstangcommented, Jan 13, 2018

I’m using jest-preset-angular@5.0 and zone@0.8.2 and fakeAsync still fails for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

tick and fakeAsync doesn't work well in Angular 13 with rxjs 7 ...
When emitting a value from within the fakeAsync , the debounceTime operator realizes that it has already scheduled a timer and yields to...
Read more >
fakeAsync does not work with debounceTime - Stack Overflow
I'm trying to write unit test for function in Angular app with debounceTime ( rxjs ). And use fakeAsync for asynchronous testing. And...
Read more >
How To Use waitForAsync and fakeAsync with Angular Testing
The waitForAsync utility tells Angular to run the code in a dedicated test zone that intercepts promises. We briefly covered the async ...
Read more >
Testing Asynchronous Code with FakeAsync in Angular
In this tutorial, we take a look at how to use fakeAsync, ... But now let's take a look at a more complicated...
Read more >
Testing timers with fakeAsync - Damir's Corner
This makes it a nice alternative to Jasmine's Clock when working with ... Time does not pass in the fakeAsync zone, so I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found