mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 22:25:20 +00:00
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.
This commit is contained in:
@@ -17,11 +17,10 @@ import AppKit
|
|||||||
final class NotificationService {
|
final class NotificationService {
|
||||||
static let shared = 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 {
|
private var isRunningTests: Bool {
|
||||||
NSClassFromString("XCTestCase") != nil ||
|
NSClassFromString("XCTestCase") != nil ||
|
||||||
ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil ||
|
ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil
|
||||||
Bundle.main.bundleIdentifier == nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private init() {}
|
private init() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user