Unlock This Episode
Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.
This just doesn’t seem to be very dependable. I wouldn’t want to depend on this test suite where first there’s magical constants being used to determine how long to wait, and second the test suite could randomly fail for no fault of our own. This creates an environment of not trusting our test suite.
Luckily Combine gives us a tool for handling this. The crux of the problem is that we used
DispatchQueue.main when telling our publishers what queue to receive values on and when describing how to debounce values.
An open source library that provides schedulers for making Combine more testable and more versatile.