Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
25 lines
891 B
TypeScript
25 lines
891 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { ErrorCode } from '@d3ro/core/errors'
|
|
import { getTTSPlaybackService } from '../../src/main/services/TTSPlaybackService'
|
|
import { useRedHarness } from './harness'
|
|
|
|
useRedHarness()
|
|
|
|
describe('유스케이스: TTS 입력 가드 (네이티브 재생 전)', () => {
|
|
it('빈 텍스트는 TTSTextEmpty 다', async () => {
|
|
await expect(getTTSPlaybackService().speak('')).rejects.toMatchObject({
|
|
code: ErrorCode.TTSTextEmpty,
|
|
})
|
|
})
|
|
|
|
it('공백만 있는 텍스트도 TTSTextEmpty 다', async () => {
|
|
await expect(getTTSPlaybackService().speak(' \n')).rejects.toMatchObject({
|
|
code: ErrorCode.TTSTextEmpty,
|
|
})
|
|
})
|
|
|
|
it('stop 은 재생 중이 아니어도 안전하다', () => {
|
|
expect(() => getTTSPlaybackService().stop()).not.toThrow()
|
|
expect(getTTSPlaybackService().isSpeaking).toBe(false)
|
|
})
|
|
})
|