Created
January 17, 2020 16:31
-
-
Save pedrovgs/7313f02f8394895236dd8cd2bf7c7d7f to your computer and use it in GitHub Desktop.
How to check if I'm running tests in iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
class IsRunningTests { | |
static func check() -> Bool { | |
guard let value = ProcessInfo.processInfo.environment["IS_RUNNING_TESTS"] else { | |
return false | |
} | |
return value == "true" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment