test: cover focused notification sound feedback

This commit is contained in:
Lawrence Chen 2026-03-20 00:48:16 -07:00 committed by Lawrence Chen
parent 80da57fc10
commit d7db13a140
2 changed files with 65 additions and 0 deletions

View file

@ -693,6 +693,10 @@ final class TerminalNotificationStore: ObservableObject {
notification in
store.scheduleUserNotification(notification)
}
private var suppressedNotificationFeedbackHandler: (TerminalNotificationStore, TerminalNotification) -> Void = {
_,
_ in
}
private var indexes = NotificationIndexes()
private init() {
@ -1262,6 +1266,16 @@ final class TerminalNotificationStore: ObservableObject {
}
}
func configureSuppressedNotificationFeedbackHandlerForTesting(
_ handler: @escaping (TerminalNotificationStore, TerminalNotification) -> Void
) {
suppressedNotificationFeedbackHandler = handler
}
func resetSuppressedNotificationFeedbackHandlerForTesting() {
suppressedNotificationFeedbackHandler = { _, _ in }
}
func promptToEnableNotificationsForTesting() {
promptToEnableNotifications()
}