Isolate composer draft tests from panic reset

The synchronous draft-store tests now run on MainActor, matching panic
reset. Suite serialization alone did not prevent panic tests in other
suites from clearing drafts between saves and assertions.
This commit is contained in:
heyaim 2026-11-06 14:44:25 -06:00
parent 59e607cf78
commit d120656d72

View File

@ -3,7 +3,10 @@ import Testing
@testable import bitchat
import BitFoundation
// Keep synchronous store assertions on the same actor as panic reset.
// Suite serialization alone does not exclude panic tests in other suites.
@Suite(.serialized)
@MainActor
struct ComposerDraftStoreTests {
/// Isolate each test from leftover in-memory drafts.
private func withCleanStore(_ body: () -> Void) {