Your First iOS & SwiftUI App: An App from Scratch, Episode 22: Intro to Unit Testing |

Learn how you can add unit tests to your app to automatically verify your app works the way you expect.

This is a companion discussion topic for the original entry at

Guys I am doing this lesson on 14 of June of 2022, and the test code isn’t compiling, it says the object game needs to be an optional. I couldn’t use the exclamation point.

This happened to me too, but I realized it was because I had initialized var game = Game! when it SHOULD be var game: Game! (colon vs equals sign).