Group Group Group Group Group Group Group Group Group

Challenge: Start a New Round |

This is a companion discussion topic for the original entry at
1 Like

Was this challenge meant to be just a challenge? In the video right before the instructions in Ray’s navigation panel he had a Test group setup with pre-written code what looks like some setting up and tear down of a test… skipping to the solution he goes to the test navigator. There is no previous mention of testing, how to setup or if it should just be expected?

@rfloresc Hey Richie! We cover Unit Testing in the previous course (Your First iOS and SwiftUI App: An App From Scratch). Here’s a link to the exact video we first talk about testing:

I hope that helps!

1 Like

Shouldn’t we change the target properties too?

  func testNewRound() {
    let oldTarget =
    game.startNewRound(points: 100)
    XCTAssertEqual(game.score, 100)
    XCTAssertEqual(game.round, 2)

I write test code like that, test fail.