Made the test initializers package-visible.

This commit is contained in:
javier committed 2026-10-25 18:39:00 +01:00
1 parent ff00fdd852
commit 2364e2d859
4 files changed
+6 -6

No files matched your search

@@ -71,7 +71,7 @@ public struct RateLimitMiddleware {
} }
/// Creates a new middleware instance that waits with `sleep`, for testing. /// Creates a new middleware instance that waits with `sleep`, for testing.
init( package init(
maximumRetries: Int, maximumRetries: Int,
baseDelay: TimeInterval, baseDelay: TimeInterval,
maximumDelay: TimeInterval, maximumDelay: TimeInterval,
@@ -74,7 +74,7 @@ public actor APIKeyTokenProvider {
} }
/// Creates a token provider that reads the current date from `now`, for testing. /// Creates a token provider that reads the current date from `now`, for testing.
init( package init(
issuerID: String?, issuerID: String?,
keyID: String, keyID: String,
privateKey: String, privateKey: String,
@@ -17,8 +17,8 @@ import HTTPTypes
import OpenAPIRuntime import OpenAPIRuntime
import Testing import Testing
// A testable import gives access to the initializer that injects the sleep closure. // A non-testable import ensures that the middleware can be created from outside the module.
@testable import ASConnectService import ASConnectService
@Suite("RateLimitMiddleware") @Suite("RateLimitMiddleware")
struct RateLimitMiddlewareTests { struct RateLimitMiddlewareTests {
@@ -17,8 +17,8 @@ import CryptoKit
import Foundation import Foundation
import Testing import Testing
// A testable import gives access to the initializer that injects the current date. // A non-testable import ensures that the provider can be created from outside the module.
@testable import ASConnectService import ASConnectService
@Suite("APIKeyTokenProvider") @Suite("APIKeyTokenProvider")
struct APIKeyTokenProviderTests { struct APIKeyTokenProviderTests {