> find-word@0.1.0 test > vitest run tests/audio.test.ts RUN v5.0.4 /home/hermes/worktrees/find-word-v0.1 ❯ tests/audio.test.ts (5 tests | 5 failed) 22ms ❯ 오디오 재생 수명과 믹서 (5) × 생성 시 무음이며 gesture의 play에서만 장치를 연다 7ms × 동시 시작을 거부하고 정지하면 모든 노드와 대기 Promise를 취소한다 8ms × 로드 도중 취소한 이전 작업이 늦게 완료되어도 소리를 시작하지 않는다 3ms × HTTP·디코드·장치 실패를 전달하고 다음 시도는 다시 로드한다 1ms × 전체 음량은 두 신호의 비율을 보존하며 0부터 1 범위로 제한한다 1ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 5 ⎯⎯⎯⎯⎯⎯⎯ FAIL tests/audio.test.ts > 오디오 재생 수명과 믹서 > 생성 시 무음이며 gesture의 play에서만 장치를 연다 AssertionError: expected "vi.fn()" to be called once, but got 0 times ❯ tests/audio.test.ts:35:23 33| const started = vi.fn(); 34| const done = f.engine.play(question, true, started); 35| expect(f.factory).toHaveBeenCalledOnce(); | ^ 36| expect(f.context.resume).toHaveBeenCalledOnce(); 37| await flush(); ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/6]⎯ FAIL tests/audio.test.ts > 오디오 재생 수명과 믹서 > 동시 시작을 거부하고 정지하면 모든 노드와 대기 Promise를 취소한다 AssertionError: expected [Function] to throw error including '재생 중' but got '오디오 미구현' Expected: "재생 중" Received: "오디오 미구현" ❯ tests/audio.test.ts:54:58 52| const done = f.engine.play(question, false, vi.fn()); 53| const cancelled = expect(done).rejects.toMatchObject({ name: 'Abor… 54| await expect(f.engine.play(question, false, vi.fn())).rejects.toTh… | ^ 55| await flush(); 56| f.engine.stop(); ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/6]⎯ FAIL tests/audio.test.ts > 오디오 재생 수명과 믹서 > 동시 시작을 거부하고 정지하면 모든 노드와 대기 Promise를 취소한다 Error: Promise returned by `expect(actual).rejects.toMatchObject(expected)` was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not guaranteed to complete before the test finishes: await expect(actual).rejects.toMatchObject(expected) ❯ tests/audio.test.ts:53:35 51| const f = fixture(); 52| const done = f.engine.play(question, false, vi.fn()); 53| const cancelled = expect(done).rejects.toMatchObject({ name: 'Abor… | ^ 54| await expect(f.engine.play(question, false, vi.fn())).rejects.toTh… 55| await flush(); ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/6]⎯ FAIL tests/audio.test.ts > 오디오 재생 수명과 믹서 > 로드 도중 취소한 이전 작업이 늦게 완료되어도 소리를 시작하지 않는다 AssertionError: expected Error: 오디오 미구현 to match object { name: 'AbortError' } - Expected + Received - { - "name": "AbortError", + Error { + "message": "오디오 미구현", } ❯ tests/audio.test.ts:68:35 66| f.fetcher.mockImplementationOnce(() => new Promise(resolve => { re… 67| const done = f.engine.play(question, false, vi.fn()); 68| const cancelled = expect(done).rejects.toMatchObject({ name: 'Abor… | ^ 69| await flush(); 70| f.engine.stop(); ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/6]⎯ FAIL tests/audio.test.ts > 오디오 재생 수명과 믹서 > HTTP·디코드·장치 실패를 전달하고 다음 시도는 다시 로드한다 AssertionError: expected [Function] to throw error including '음성 파일' but got '오디오 미구현' Expected: "음성 파일" Received: "오디오 미구현" ❯ tests/audio.test.ts:79:58 77| const f = fixture(); 78| f.fetcher.mockResolvedValueOnce({ ok: false } as Response); 79| await expect(f.engine.play(question, false, vi.fn())).rejects.toTh… | ^ 80| f.context.decodeAudioData.mockRejectedValueOnce(new Error('decode'… 81| await expect(f.engine.play(question, false, vi.fn())).rejects.toTh… ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/6]⎯ FAIL tests/audio.test.ts > 오디오 재생 수명과 믹서 > 전체 음량은 두 신호의 비율을 보존하며 0부터 1 범위로 제한한다 TypeError: Cannot read properties of undefined (reading 'gain') ❯ tests/audio.test.ts:94:24 92| const done = f.engine.play(question, false, vi.fn()); 93| await flush(); 94| expect(f.gains[0]!.gain.value).toBe(.3); | ^ 95| f.engine.setVolume(8); 96| expect(f.gains[0]!.gain.setTargetAtTime).toHaveBeenCalledWith(1, 2… ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/6]⎯ ⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯ Vitest caught 3 unhandled errors during the test run. This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected. ⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯ Error: 오디오 미구현 ❯ AudioEngine.play src/audio/engine.ts:13:99 11| export class AudioEngine implements AudioPort { 12| constructor(_factory: () => AudioContext = () => new AudioContext(),… 13| async play(_question: Question, _intro: boolean, _onStarted: () => v… | ^ 14| stop(): void { /* RED 확인을 위한 인터페이스 자리만 확보한다. */ } 15| dispose(): void { /* 정리 동작은 취소 테스트 후 구현한다. */ } ❯ tests/audio.test.ts:34:27 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:1632:35 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:2794:26 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3334:20 ❯ runWithCancel node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3329:10 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3314:20 ❯ runWithTimeout node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3272:10 This error originated in "tests/audio.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. ⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯ AssertionError: expected Error: 오디오 미구현 to match object { name: 'AbortError' } ❯ Assertion.__VITEST_REJECTS__ node_modules/vitest/dist/chunks/index.uwTEEBsB.js:2480:33 ❯ Assertion.propertyGetter node_modules/chai/index.js:1607:27 ❯ Object.proxyGetter [as get] node_modules/chai/index.js:1696:22 ❯ tests/audio.test.ts:53:35 51| const f = fixture(); 52| const done = f.engine.play(question, false, vi.fn()); 53| const cancelled = expect(done).rejects.toMatchObject({ name: 'Abor… | ^ 54| await expect(f.engine.play(question, false, vi.fn())).rejects.toTh… 55| await flush(); ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:1632:35 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:2794:26 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3334:20 ❯ runWithCancel node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3329:10 This error originated in "tests/audio.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. ⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯ Error: 오디오 미구현 ❯ AudioEngine.play src/audio/engine.ts:13:99 11| export class AudioEngine implements AudioPort { 12| constructor(_factory: () => AudioContext = () => new AudioContext(),… 13| async play(_question: Question, _intro: boolean, _onStarted: () => v… | ^ 14| stop(): void { /* RED 확인을 위한 인터페이스 자리만 확보한다. */ } 15| dispose(): void { /* 정리 동작은 취소 테스트 후 구현한다. */ } ❯ tests/audio.test.ts:92:27 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:1632:35 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:2794:26 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3334:20 ❯ runWithCancel node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3329:10 ❯ node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3314:20 ❯ runWithTimeout node_modules/vitest/dist/chunks/run.Cm2sd7-x.js:3272:10 This error originated in "tests/audio.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Test Files 1 failed (1) Tests 5 failed (5) Errors 3 errors Start at 04:58:29 Duration 885ms (environment 75%, setup 13%, transform 7%, tests 3%, import 1%, worker 1%)