Unit Test fatalError in Swift
The idea is to replace the built-in fatalError function with your own, which is replaced during a unit test’s execution, so that you run unit test assertions in it. However, the tricky part is that fatalError is @noreturn, so you need to override it with a function which never returns. Override fatalError In your app … Read more