Where do I put the ```Dispatchers.setMain(...)``` ...
# testballoon
d
Where do I put the
Copy code
Dispatchers.setMain(...)
in the blue area at the top of the test suite, or somewhere else? (There's no beforeSuite is there?)
o
The easiest way is putting your top-level test suite into the predefined compartment:
Copy code
val MyTestsOnMainDispatcher by testSuite(compartment = { TestCompartment.MainDispatcher }) {
    // ...
}
Another option would be to use TestConfig.mainDispatcher for that.
d
Don't you manage the TestDispatcher in the dsl?
o
You want to wrap your code in a TestDispatcher setup. It needs to be set up and teared down. So it's green code unless you want to spill a setup across the entire test run (it's global state in the end). TestBalloon makes it safe for you if you use the above configuration.