I have been reading a lot about angular testing lately and the pairs are always async+fixture.whenStable and fakeAsync+tick, however you can always call fixtrue.whenStable as it is not tightly coupled. If you call it when not using the async utility to track promises in a test zone will it actually do anything?
For example:
it('should be able to do this thing that needs some async setup', () => {
fixture.detectChanges();
fixture.whenStable().then()
});
I understand the difference between FakeAsync/Tick
and fixture.detectChanges
. My question is regarding what fixture.whenstable
will do when inside of a FakeAsync
execution zone as an Async
zone should keep track of async work allowing fixture.whenstable
to hook into that tracking, at least as I understand it. Or indeed if used and not within an async execution zone at all.
So if fixture.whenstable is used inside a FakeAsync function, or a function that does not setup an async execution zone, will it work as intended?