57 lines
2.9 KiB
Plaintext
57 lines
2.9 KiB
Plaintext
|
||
> find-word@0.1.0 test
|
||
> vitest run tests/dsp.test.ts
|
||
|
||
|
||
RUN v5.0.4 /home/hermes/worktrees/find-word-v0.1
|
||
|
||
❯ tests/dsp.test.ts (3 tests | 3 failed) 70ms
|
||
❯ 상대 dB와 결정론적 배경 합성 (3)
|
||
× 20 log10(음성 gain / 배경 gain)이 표시 dB와 일치한다 5ms
|
||
× 평균 전력을 맞추고 원본 배열을 변경하지 않으며 무음은 오류로 알린다 1ms
|
||
× 여덟 환경이 서로 다르고 같은 seed는 같은 안전 범위 신호를 만든다 62ms
|
||
|
||
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 3 ⎯⎯⎯⎯⎯⎯⎯
|
||
|
||
FAIL tests/dsp.test.ts > 상대 dB와 결정론적 배경 합성 > 20 log10(음성 gain / 배경 gain)이 표시 dB와 일치한다
|
||
AssertionError: expected +0 to be close to 6, received difference is 6, but expected 5e-11
|
||
❯ tests/dsp.test.ts:10:77
|
||
8| describe('상대 dB와 결정론적 배경 합성', () => {
|
||
9| it('20 log10(음성 gain / 배경 gain)이 표시 dB와 일치한다', () => {
|
||
10| for (const level of LEVELS) expect(20 * Math.log10(dbToGain(level.…
|
||
| ^
|
||
11| expect(dbToGain(-6)).toBeCloseTo(.501187, 5);
|
||
12| });
|
||
|
||
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯
|
||
|
||
FAIL tests/dsp.test.ts > 상대 dB와 결정론적 배경 합성 > 평균 전력을 맞추고 원본 배열을 변경하지 않으며 무음은 오류로 알린다
|
||
AssertionError: expected 0.2738612848738597 to be close to 0.12, received difference is 0.1538612848738597, but expected 5e-7
|
||
❯ tests/dsp.test.ts:16:25
|
||
14| const input = new Float32Array([.4, -.2, .1, -.3]);
|
||
15| const output = normalizeRms(input);
|
||
16| expect(rms(output)).toBeCloseTo(.12, 6);
|
||
| ^
|
||
17| expect(output).not.toBe(input);
|
||
18| expect(() => normalizeRms(new Float32Array(4))).toThrow('무음');
|
||
|
||
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯
|
||
|
||
FAIL tests/dsp.test.ts > 상대 dB와 결정론적 배경 합성 > 여덟 환경이 서로 다르고 같은 seed는 같은 안전 범위 신호를 만든다
|
||
AssertionError: expected +0 to be close to 0.12, received difference is 0.12, but expected 0.000005
|
||
❯ tests/dsp.test.ts:26:27
|
||
24| expect(signal).toHaveLength(16000);
|
||
25| expect(signal).toEqual(synthesizeBackground(preset, 16000, 1));
|
||
26| expect(rms(signal)).toBeCloseTo(.12, 5);
|
||
| ^
|
||
27| expect(Math.max(...signal.map(Math.abs))).toBeLessThan(1);
|
||
28| // 루프 경계에서 불연속 클릭이 생기지 않도록 양 끝을 0으로 감싼다.
|
||
|
||
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯
|
||
|
||
|
||
Test Files 1 failed (1)
|
||
Tests 3 failed (3)
|
||
Start at 04:57:18
|
||
Duration 902ms (environment 72%, setup 12%, tests 9%, transform 5%, worker 1%, import 1%)
|