Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 678 Bytes

0029-tearDown-position.md

File metadata and controls

23 lines (16 loc) · 678 Bytes

Call super.tearDown At the End of tearDown method.

  • Status: accepted
  • Deciders: iOS Team
  • Date: 2023-27-02

Context

There were discussions on code reviews about the position of super.tearDown(), Apple's doc reviewed and a decision made since we may want to run the unit tests in parallel in near feature.

Decision

Call super.tearDown() at the end of the tearDown method:

override func tearDown() {
    mockDefaultsInstance.assertions(name: "mockDefaultsInstance")
    mockDefaultsInstance = nil
    defaults = nil
    super.tearDown()
}