Tutorial 2, Step "Unit testing"
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 7.9k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
After following all the steps, and when it was time to build and run the tests on RootRouterTests.swift, the code wouldn't compile because LoggedInInteractableMock did not implement the gameDidStart method from OffGameListener (through LoggedInInteractable).
To fix it, I added the gameDidStart implementation with a counter for method calls, as well as a closure for providing an implementation stub.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Tutorial 2, Step “Unit testing” and inspect RootRouterTests.swift, especially LoggedInInteractableMock and its OffGameListener contract. Run the tutorial’s tests to reproduce the compilation failure; done means the mock satisfies the contract and the tests build and run successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100