title: deinit called but the uint testing not finished
body: <p>I'm trying to test my coordinator flow but the child coordinator <code>deinit</code> called before the unit test case finished    </p>
  
  <p>My coordinator class</p>
  
  <pre><code>public final class AppCoordinator: Coordinator {
  
          public var childCoordinators: [Coordinator] = []
  
          public var navigationController: UINavigationController
          var window: UIWindow?
  
          public init(window: UIWindow?) {
              self.window = window
              let secController =  SecController()
              self.navigationController = UINavigationController(rootViewController: secController)
              secController.delegate = self
  
          }
          public func start() {
              window?.rootViewController = navigationController
              window?.makeKeyAndVisible()
          }
      }
  
      extension AppCoordinator: SecControllerDelegate, SignInControllerDelegate {
          public func removeSingIn() {
  
              self.childCoordinators.removeFirst()
          }
  
          public func showSignIn() {
              let signInCoordinator = SignInCoordinator(navigationController: self.navigationController)
              signInCoordinator.delegate = self
              self.childCoordinators.append(signInCoordinator)
              signInCoordinator.start()
  
          }
  
  }
  </code></pre>
  
  <p>Unit test class </p>
  
  <pre><code>class AppCoordinatorTests: XCTestCase {
      var coordinator: AppCoordinator!
  
      override func setUp() {
          super.setUp()
          coordinator = AppCoordinator(window: UIWindow())
      }
  
      override func tearDown() {
          coordinator = nil
          super.tearDown()
      }
  
      func testStartMethod() {
          coordinator.start()
          XCTAssertNotNil(coordinator.window?.rootViewController)
      }
  
      func testShowSignIn() {
          coordinator.showSignIn()
          XCTAssertFalse(coordinator.childCoordinators.isEmpty)
          XCTAssertTrue(coordinator.navigationController.visibleViewController is SignInController)
          }
  }
  </code></pre>
  
  <p>when try to test <code>testShowSignIn</code> always failed because of the <code>deinit</code> call <code>removeSingIn</code> function </p>
  
  <pre><code>public class SignInController: UIViewController {
  
      public weak var delegate: SignInControllerDelegate?
  
      public init() {
  
          super.init(nibName: nil, bundle: nil)
      }
  
      deinit {
          self.delegate?.removeSingIn()
      }
  
  }
  </code></pre>