test(contracts): schema 正反例覆盖发现页查询参数
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
740e2fe67d
commit
6da5dea75a
1 file changed
+8
@@ -39,6 +39,10 @@ const STRING_CANDIDATES = [
|
|||||||
"zh-hans",
|
"zh-hans",
|
||||||
"movie:157336",
|
"movie:157336",
|
||||||
"zh-CN",
|
"zh-CN",
|
||||||
|
// 发现页筛选:原始语言、地区、年份
|
||||||
|
"zh",
|
||||||
|
"US",
|
||||||
|
"2024",
|
||||||
];
|
];
|
||||||
const NUMBER_CANDIDATES = [1, 50, 2024, 0.5, 0, 4096, 128000];
|
const NUMBER_CANDIDATES = [1, 50, 2024, 0.5, 0, 4096, 128000];
|
||||||
|
|
||||||
@@ -114,6 +118,10 @@ const OVERRIDES: Record<string, (v: Record<string, unknown>) => Record<string, u
|
|||||||
return { ...v, options: [o, { ...o, id: "b" }] };
|
return { ...v, options: [o, { ...o, id: "b" }] };
|
||||||
},
|
},
|
||||||
EngineStats: (v) => ({ ...v, byStatus: { pending: 1 } }),
|
EngineStats: (v) => ({ ...v, byStatus: { pending: 1 } }),
|
||||||
|
// 发现页查询:筛选条件只配特定列表(跨字段校验),正例只给列表
|
||||||
|
DiscoverTmdbQuery: () => ({ list: "discover", type: "movie", genre: "28", year: "2024" }),
|
||||||
|
DiscoverDoubanQuery: () => ({ list: "explore", type: "tv", genre: "悬疑", year: "2024" }),
|
||||||
|
DiscoverBangumiQuery: () => ({ list: "rank", year: "2024" }),
|
||||||
TypedEventEnvelope: () => ({
|
TypedEventEnvelope: () => ({
|
||||||
seq: 1,
|
seq: 1,
|
||||||
at: "2026-09-27T08:00:00Z",
|
at: "2026-09-27T08:00:00Z",
|
||||||
|
|||||||
Reference in new issue
Block a user