fix: version neural audio requests for v0.1.1
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user