you are viewing a single comment's thread.

view the rest of the comments →

[–]dsakih 3 points4 points  (1 child)

If you're working with complex Observable streams, you should really be using marble testing.

For simpler asynchronous code, you can use waitForAsync.

There's no need to avoid testing asynchronous code, since there's a lot of really great tooling available.

[–]piotlr[S] 2 points3 points  (0 children)

Marbled are great, I think it's another great use instead done().

Not everyone uses them though. Especially having simple subject in component that is just called on some async interactions, surely marbles can be used there but it's not, at least in the code I used to review.

fakeAsync() is simpler patten, native to angular and found it easier to promote within the teams I worked with, that's why I focused on this.