Skip to content

Commit

Permalink
wew
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhenry committed Jun 28, 2024
1 parent f7fb065 commit 7a94ad3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Demo/DemoTests/SnapshotTests.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import Combine
import Foundation
import SnapshotTesting
import XCTest
@testable import XConfigs

final class SnapshotTests: XCTestCase {
typealias ViewModel = XConfigsViewModel
private var subscriptions: Set<AnyCancellable>!

override func setUpWithError() throws {
subscriptions = Set<AnyCancellable>()
try super.setUpWithError()
XConfigs.configure(with: MockConfigs.self, keyValueProvider: MockKeyValueProvider(), option: .allowInAppModification(.init(store: MockKeyValueStore())))
}

override func tearDownWithError() throws {
try super.tearDownWithError()
}

// MARK: - Snapshots ViewControllers

func testInAppModificationDisabled() throws {
Expand Down Expand Up @@ -106,7 +108,7 @@ final class SnapshotTests: XCTestCase {
}

private func assertVCSnapshotWithActionFromHost(
timeout: TimeInterval = 300,
timeout: TimeInterval = 2,
_ action: @escaping (UIViewController) -> Void,
file: StaticString = #file,
testName: String = #function,
Expand Down
1 change: 1 addition & 0 deletions Demo/DemoTests/XConfigsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final class XConfigsTests: XCTestCase {
private let envChoices = ["dev", "stage", "prod"].map { Choice(displayName: $0, value: $0) }

override func setUpWithError() throws {
try super.setUpWithError()
subscriptions = .init()
provider = MockKeyValueProvider()
store = MockKeyValueStore()
Expand Down

0 comments on commit 7a94ad3

Please sign in to comment.