Skip to content

Commit 858e878

Browse files
committed
Fix CI test failures by simplifying isRunningTests check
Remove Bundle.main.bundleIdentifier == nil from isRunningTests detection as it may have unintended side effects in CI environments. The XCTestCase class check and XCTestConfigurationFilePath environment variable are sufficient for detecting both XCTest and Swift Testing.
1 parent fa0a15c commit 858e878

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bitchat/Services/NotificationService.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ import AppKit
1717
final class NotificationService {
1818
static let shared = NotificationService()
1919

20-
/// Returns true if running in test environment (XCTest, Swift Testing, or SPM tests)
20+
/// Returns true if running in test environment (XCTest or Swift Testing)
2121
private var isRunningTests: Bool {
2222
NSClassFromString("XCTestCase") != nil ||
23-
ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil ||
24-
Bundle.main.bundleIdentifier == nil
23+
ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil
2524
}
2625

2726
private init() {}

0 commit comments

Comments
 (0)