Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Sources/OneWay/ViewStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ extension ViewStore {
timeout: TimeInterval = 2,
sourceLocation: Testing.SourceLocation = #_sourceLocation
) async where Property: Sendable & Equatable {
await Task { @MainActor in
await Task.yield()
}.value
await store.expect(keyPath, input, timeout: timeout, sourceLocation: sourceLocation)
}
#else
Expand All @@ -134,6 +137,9 @@ extension ViewStore {
timeout: TimeInterval = 2,
sourceLocation: Testing.SourceLocation = #_sourceLocation
) async where Property: Sendable & Equatable {
await Task { @MainActor in
await Task.yield()
}.value
await store.expect(keyPath, input, timeout: timeout, sourceLocation: sourceLocation)
}
#endif
Expand Down Expand Up @@ -163,6 +169,9 @@ extension ViewStore {
file: StaticString = #filePath,
line: UInt = #line
) async where Property: Sendable & Equatable {
await Task { @MainActor in
await Task.yield()
}.value
await store.xctExpect(keyPath, input, timeout: timeout, file: file, line: line)
}
#else
Expand All @@ -173,6 +182,9 @@ extension ViewStore {
file: StaticString = #filePath,
line: UInt = #line
) async where Property: Sendable & Equatable {
await Task { @MainActor in
await Task.yield()
}.value
await store.xctExpect(keyPath, input, timeout: timeout, file: file, line: line)
}
#endif
Expand Down