Files
helder/Tests/HelderUITests/Support/Fakes/FakeSpeech.swift
T
2026-10-23 09:40:20 +02:00

14 lines
395 B
Swift

import HelderServices
/// Records what would have been read aloud; `finish()` plays the voice reaching the end.
@MainActor
final class FakeSpeech: SpeechServicing {
var onFinish: (() -> Void)?
private(set) var spoken: [String] = []
private(set) var stops = 0
func speak(_ text: String) { spoken.append(text) }
func stop() { stops += 1 }
func finish() { onFinish?() }
}