From 858e87895994609bd54ad6f871cbf0525b97b451 Mon Sep 17 00:00:00 2001 From: jack Date: Tue, 25 Nov 2025 07:43:46 -1000 Subject: [PATCH] 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. --- bitchat/Services/NotificationService.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bitchat/Services/NotificationService.swift b/bitchat/Services/NotificationService.swift index 07eb037d..c6790e80 100644 --- a/bitchat/Services/NotificationService.swift +++ b/bitchat/Services/NotificationService.swift @@ -17,11 +17,10 @@ import AppKit final class NotificationService { static let shared = NotificationService() - /// Returns true if running in test environment (XCTest, Swift Testing, or SPM tests) + /// Returns true if running in test environment (XCTest or Swift Testing) private var isRunningTests: Bool { NSClassFromString("XCTestCase") != nil || - ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil || - Bundle.main.bundleIdentifier == nil + ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil } private init() {}