fix: use strict ASCII assertion in tests and update OpenAPI spec

Replace fragile Unicode-range regex with positive ASCII check
(/^[\x20-\x7E]+$/) that also catches emoji and supplementary plane
characters. Update OpenAPI spec to document percent-encoding.
This commit is contained in:
SnapOtter
2026-05-13 10:05:42 +08:00
parent ac8c585beb
commit 35e8ff1c46
3 changed files with 4 additions and 4 deletions
@@ -447,7 +447,7 @@ describe("Pipeline batch execution", () => {
expect(res.statusCode).toBe(200);
const raw = res.headers["x-file-results"] as string;
expect(raw).not.toMatch(/[-￿]/);
expect(raw).toMatch(/^[\x20-\x7E]+$/);
const fileResults = JSON.parse(decodeURIComponent(raw));
expect(fileResults["0"]).toContain("图片");
expect(fileResults["1"]).toContain("写真テスト");