1 parent 9ea012e commit 85a9de0Copy full SHA for 85a9de0
1 file changed
Application/DevLogPresentation/Tests/Root/RootFeatureTestSupport.swift
@@ -9,6 +9,7 @@ import Combine
9
import ComposableArchitecture
10
import DevLogCore
11
import DevLogDomain
12
+import Foundation
13
import Testing
14
@testable import DevLogPresentation
15
@@ -299,9 +300,18 @@ final class RootTrackAnalyticsEventUseCaseSpy: TrackAnalyticsEventUseCase {
299
300
}
301
302
final class RootApplicationBadgeCountSpy: @unchecked Sendable {
- private(set) var counts = [Int]()
303
+ private let lock = NSLock()
304
+ private var protectedCounts = [Int]()
305
+
306
+ var counts: [Int] {
307
+ lock.withLock {
308
+ protectedCounts
309
+ }
310
311
312
func setBadgeCount(_ count: Int) async throws {
- counts.append(count)
313
314
+ protectedCounts.append(count)
315
316
317
0 commit comments