mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Automated rebrand of all openclaw references to hanzo bot: - Package: openclaw -> @hanzo/bot - Binary: openclaw -> hanzo-bot - Config: ~/.openclaw -> ~/.hanzo/bot - Docker: ghcr.io/hanzoai/bot - Env vars: OPENCLAW_* -> BOT_* - Bundle IDs: ai.hanzo.bot.* - Product name: Hanzo Bot
25 lines
817 B
Swift
25 lines
817 B
Swift
import Foundation
|
|
import Testing
|
|
@testable import Hanzo Bot
|
|
|
|
@MainActor
|
|
@Suite struct TalkModeManagerTests {
|
|
@Test func detectsPCMFormatRejectionFromElevenLabsError() {
|
|
let error = NSError(
|
|
domain: "ElevenLabsTTS",
|
|
code: 403,
|
|
userInfo: [
|
|
NSLocalizedDescriptionKey: "ElevenLabs failed: 403 subscription_required output_format=pcm_44100",
|
|
])
|
|
#expect(TalkModeManager._test_isPCMFormatRejectedByAPI(error))
|
|
}
|
|
|
|
@Test func ignoresGenericPlaybackFailuresForPCMFormatRejection() {
|
|
let error = NSError(
|
|
domain: "StreamingAudio",
|
|
code: -1,
|
|
userInfo: [NSLocalizedDescriptionKey: "queue enqueue failed"])
|
|
#expect(TalkModeManager._test_isPCMFormatRejectedByAPI(error) == false)
|
|
}
|
|
}
|