Skip to content

Instantly share code, notes, and snippets.

@pedrovgs
Created January 17, 2020 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrovgs/7313f02f8394895236dd8cd2bf7c7d7f to your computer and use it in GitHub Desktop.
Save pedrovgs/7313f02f8394895236dd8cd2bf7c7d7f to your computer and use it in GitHub Desktop.
How to check if I'm running tests in iOS
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