Skip to content

Commit f7f9b9e

Browse files
authored
Remove @escaping from test closure in Application.test(_:_:) (#555)
1 parent b231249 commit f7f9b9e

5 files changed

+5
-5
lines changed

Sources/HummingbirdTesting/Application+Test.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extension ApplicationProtocol {
7676
/// - test: test function
7777
public func test<Value>(
7878
_ testingSetup: TestingSetup,
79-
_ test: @escaping @Sendable (any TestClientProtocol) async throws -> Value
79+
_ test: @Sendable (any TestClientProtocol) async throws -> Value
8080
) async throws -> Value {
8181
let app: any ApplicationTestFramework = switch testingSetup.value {
8282
case .router: try await RouterTestFramework(app: self)

Sources/HummingbirdTesting/ApplicationTester.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ protocol ApplicationTestFramework {
9393
associatedtype Client: TestClientProtocol
9494

9595
/// Run test server
96-
func run<Value>(_ test: @escaping @Sendable (any TestClientProtocol) async throws -> Value) async throws -> Value
96+
func run<Value>(_ test: @Sendable (any TestClientProtocol) async throws -> Value) async throws -> Value
9797
}

Sources/HummingbirdTesting/AsyncHTTPClientTestFramework.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ final class AsyncHTTPClientTestFramework<App: ApplicationProtocol>: ApplicationT
5656
}
5757

5858
/// Start tests
59-
func run<Value>(_ test: @escaping @Sendable (TestClientProtocol) async throws -> Value) async throws -> Value {
59+
func run<Value>(_ test: @Sendable (TestClientProtocol) async throws -> Value) async throws -> Value {
6060
try await withThrowingTaskGroup(of: Void.self) { group in
6161
let serviceGroup = ServiceGroup(
6262
configuration: .init(

Sources/HummingbirdTesting/LiveTestFramework.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ final class LiveTestFramework<App: ApplicationProtocol>: ApplicationTestFramewor
4949
}
5050

5151
/// Start tests
52-
func run<Value>(_ test: @escaping @Sendable (TestClientProtocol) async throws -> Value) async throws -> Value {
52+
func run<Value>(_ test: @Sendable (TestClientProtocol) async throws -> Value) async throws -> Value {
5353
try await withThrowingTaskGroup(of: Void.self) { group in
5454
let serviceGroup = ServiceGroup(
5555
configuration: .init(

Sources/HummingbirdTesting/RouterTestFramework.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct RouterTestFramework<Responder: HTTPResponder>: ApplicationTestFramework w
4848
}
4949

5050
/// Run test
51-
func run<Value>(_ test: @escaping @Sendable (TestClientProtocol) async throws -> Value) async throws -> Value {
51+
func run<Value>(_ test: @Sendable (TestClientProtocol) async throws -> Value) async throws -> Value {
5252
let client = Client(
5353
responder: self.responder,
5454
logger: self.logger,

0 commit comments

Comments
 (0)