fix: version neural audio requests for v0.1.1

This commit is contained in:
oz
2026-10-14 07:31:47 +00:00
parent a92b2ba1e9
commit c92660b514
38 changed files with 3400 additions and 42 deletions
+26
View File
@@ -0,0 +1,26 @@
import { expect, it } from "vitest";
import { isAudioRequest } from "./browser/audio-requests";
it("WAV 요청 판정은 query의 버전·순서와 무관하게 pathname을 사용한다", () => {
for (const path of [
"/audio/intro.wav?v=0.1.1",
"/audio/luck-apple.wav?v=0.1.1",
"/audio/luck-apple.wav?retry=1&v=0.1.1",
"/audio/luck-apple.wav?v=0.1.1&retry=1",
"/audio/luck-apple.wav",
]) {
expect
.soft(isAudioRequest(new URL(path, "http://localhost")), path)
.toBe(true);
}
for (const path of [
"/audio/manifest.json?file=intro.wav",
"/other/intro.wav",
"/audio-backup/intro.wav",
"/audio/intro.wav.txt?v=0.1.1",
]) {
expect
.soft(isAudioRequest(new URL(path, "http://localhost")), path)
.toBe(false);
}
});