Skip to content

Commit 25aadd4

Browse files
committed
chore: fix build on Windows
1 parent d8f47dc commit 25aadd4

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

Package.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ let package = Package(
7979
dependencies: [
8080
"Auth",
8181
"_Helpers",
82+
"TestHelpers",
8283
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"),
8384
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
8485
],
@@ -115,6 +116,7 @@ let package = Package(
115116
name: "RealtimeTests",
116117
dependencies: [
117118
"Realtime",
119+
"TestHelpers",
118120
.product(name: "CustomDump", package: "swift-custom-dump"),
119121
]
120122
),
@@ -132,6 +134,7 @@ let package = Package(
132134
]
133135
),
134136
.testTarget(name: "SupabaseTests", dependencies: ["Supabase"]),
137+
.target(name: "TestHelpers"),
135138
]
136139
)
137140

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// WithMainSerialExecutor+Windows.swift
3+
//
4+
//
5+
// Created by Guilherme Souza on 12/03/24.
6+
//
7+
8+
import Foundation
9+
10+
#if os(Windows)
11+
/// Calling this method on Windows has no effect.
12+
public func withMainSerialExecutor(
13+
@_implicitSelfCapture operation: () throws -> Void
14+
) rethrows {
15+
try operation()
16+
}
17+
#endif

Tests/AuthTests/AuthClientTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import XCTest
99
@_spi(Internal) import _Helpers
1010
import ConcurrencyExtras
11+
import TestHelpers
1112

1213
@testable import Auth
1314

Tests/RealtimeTests/RealtimeTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import XCTest
33
import ConcurrencyExtras
44
import CustomDump
55
@testable import Realtime
6+
import TestHelpers
67

78
final class RealtimeTests: XCTestCase {
89
let url = URL(string: "https://localhost:54321/realtime/v1")!

0 commit comments

Comments
 (0)