Pro-tip to boost test setup
Add
IS_UNIT_TESTINGenvironment variableEnsure only unneeded functionality is skipped for unit testing
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions opts: ...
) -> Bool {
let isUnitTesting = ProcessInfo.processInfo.environment["IS_UNIT_TESTING"] == "YES"
if !isUnitTesting {
// Do UI-related setup, which can be skipped when testing
}
return true
}Thermal State Behavior Example from iOS

