Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchOS Support #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
15 changes: 11 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ let package = Package(
name: "EmealKit",
platforms: [
.macOS(.v10_15),
.iOS(.v13)
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(
Expand All @@ -21,8 +23,13 @@ let package = Package(
.target(
name: "EmealKit",
dependencies: ["HTMLString", "Regex"]),
.testTarget(
name: "EmealKitTests",
dependencies: ["EmealKit"]),
]
)

#if !os(watchOS)
package.targets.append(
.testTarget(
name: "EmealKitTests",
dependencies: ["EmealKit"])
)
#endif
2 changes: 2 additions & 0 deletions Tests/EmealKitTests/APITests.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !os(watchOS)
import XCTest
import EmealKit

Expand Down Expand Up @@ -54,3 +55,4 @@ class APITests: XCTestCase {
waitForExpectations(timeout: 10)
}
}
#endif
2 changes: 2 additions & 0 deletions Tests/EmealKitTests/CanteenTests.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !os(watchOS)
import XCTest
import EmealKit
import CoreLocation
Expand Down Expand Up @@ -29,3 +30,4 @@ class CanteenTests: XCTestCase {
XCTAssertEqual(alteMensa.location?.coordinate.longitude, 13.724)
}
}
#endif
4 changes: 3 additions & 1 deletion Tests/EmealKitTests/CardserviceTests.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !os(watchOS)
import Foundation
import XCTest
import EmealKit
Expand All @@ -24,10 +25,11 @@ class CardserviceTests: XCTestCase {
}
}

waitForExpectations(timeout: 5)
waitForExpectations(timeout: 10)
}

static var allTests = [
("testLogin", testLogin)
]
}
#endif
3 changes: 2 additions & 1 deletion Tests/EmealKitTests/MealTests.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !os(watchOS)
import XCTest
import EmealKit

Expand Down Expand Up @@ -61,4 +62,4 @@ class MealTests: XCTestCase {
XCTAssert(dinner.isDinner)
}
}

#endif