Skip to content

Commit a9e490e

Browse files
committed
Updated tests for windows compat
1 parent f11b809 commit a9e490e

File tree

2 files changed

+1
-31
lines changed

2 files changed

+1
-31
lines changed

Tests/Segment-Tests/Analytics_Tests.swift

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,6 @@ final class Analytics_Tests: XCTestCase {
175175
let outputReader = OutputReaderPlugin()
176176
analytics.add(plugin: outputReader)
177177

178-
#if !os(watchOS) && !os(Linux)
179-
/* Disabling this for now; Newer SDKs, it's getting even more delay-ful.
180-
// prime the pump for userAgent, since it's retrieved async.
181-
let vendorSystem = VendorSystem.current
182-
while vendorSystem.userAgent == nil {
183-
RunLoop.main.run(until: Date.distantPast)
184-
}
185-
*/
186-
#endif
187-
188178
waitUntilStarted(analytics: analytics)
189179

190180
// add a referrer
@@ -207,12 +197,6 @@ final class Analytics_Tests: XCTestCase {
207197
let referrer = context?["referrer"] as! [String: Any]
208198
XCTAssertEqual(referrer["url"] as! String, "https://google.com")
209199

210-
// this key not present on watchOS (doesn't have webkit)
211-
#if !os(watchOS)
212-
/* Disabling this for now; Newer SDKs, it's getting even more delay-ful. */
213-
//XCTAssertNotNil(context?["userAgent"], "userAgent missing!")
214-
#endif
215-
216200
// these keys not present on linux or Windows
217201
#if !os(Linux) && !os(Windows)
218202
XCTAssertNotNil(context?["app"], "app missing!")
@@ -228,16 +212,6 @@ final class Analytics_Tests: XCTestCase {
228212
let outputReader = OutputReaderPlugin()
229213
analytics.add(plugin: outputReader)
230214

231-
#if !os(watchOS) && !os(Linux)
232-
/* Disabling this for now; Newer SDKs, it's getting even more delay-ful.
233-
// prime the pump for userAgent, since it's retrieved async.
234-
let vendorSystem = VendorSystem.current
235-
while vendorSystem.userAgent == nil {
236-
RunLoop.main.run(until: Date.distantPast)
237-
}
238-
*/
239-
#endif
240-
241215
waitUntilStarted(analytics: analytics)
242216

243217
// add a referrer
@@ -259,10 +233,6 @@ final class Analytics_Tests: XCTestCase {
259233

260234
let referrer = context?["referrer"] as! [String: Any]
261235
XCTAssertEqual(referrer["url"] as! String, "https://google.com")
262-
263-
/* Disabling this for now; Newer SDKs, it's getting even more delay-ful.
264-
XCTAssertEqual(context?["userAgent"] as! String, "testing user agent")
265-
*/
266236

267237
// these keys not present on linux
268238
#if !os(Linux) && !os(Windows)

Tests/Segment-Tests/HTTPClient_Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Brandon Sneed on 1/21/21.
66
//
77

8-
#if !os(Linux)
8+
#if !os(Linux) && !os(Windows)
99

1010
import XCTest
1111
@testable import Segment

0 commit comments

Comments
 (0)