I want to check if all key value observers will be deleted in deinitmy view controller.
In the test class, I defined the following method to start the life of the image controller
func startLifecycle() {
_ = viewController.view
}
In my testing method, I try to call deinitby simply assigning nil to an instance of my view instance
testViewController = nil
XCTAssert for stuff...
But deinitit is not called when performing my test. I do not see obvious save cycles in my VC code, which is still called when I run the code in my application, and not the test environment deinit, so it does not seem to hold the view controller in memory.
What is the correct way to release a view controller during testing?