Skip to content

Commit 947eb8b

Browse files
glenn-klaviyoclaude
andcommitted
fix(tests): move MockNotificationCenter out of #if canImport(Testing) guard
TestData.swift references MockNotificationCenter unconditionally, so on Xcode 15.4 where Swift Testing is unavailable the type was never compiled and the release build failed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3ee11f6 commit 947eb8b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Tests/KlaviyoSwiftTests/KlaviyoNotificationDelegateTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
@testable import KlaviyoSwift
99
import UserNotifications
1010

11-
#if canImport(Testing)
12-
import Testing
13-
1411
// MARK: - Test Doubles
1512

1613
/// Minimal `UNUserNotificationCenterDelegate` conformer used for object-identity assertions.
@@ -41,6 +38,9 @@ final class MockNotificationCenter: UserNotificationCenterProtocol {
4138

4239
// MARK: - Tests
4340

41+
#if canImport(Testing)
42+
import Testing
43+
4444
// Note: the `klaviyo_automatic_push_tracking` plist key itself is verified manually
4545
// in the example app — `Bundle.main` in the test runner never carries it, and making
4646
// `Bundle` injectable would add abstraction beyond the current ticket's scope.

0 commit comments

Comments
 (0)