test(contracts): sample full enum-keyed counts for SubscriptionOverviewPage
zod v4 records keyed by an enum require every key; the generic sample only
produced {k: "v"}, so the positive example failed after W9-E.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2b8fe667a5
commit
04947c4b78
1 file changed
+5
@@ -88,6 +88,11 @@ const OVERRIDES: Record<string, (v: Record<string, unknown>) => Record<string, u
|
||||
PathMappingCreate: (v) => ({ ...v, viewKind: "downloader", mediaServerInstanceId: null }),
|
||||
PathMappingUpdate: (v) => ({ ...v, viewKind: "downloader", mediaServerInstanceId: null }),
|
||||
ExternalIdentityCreate: (v) => ({ ...v, contentUnitId: null }),
|
||||
// 枚举键的 record 在 zod v4 里要求键齐全
|
||||
SubscriptionOverviewPage: (v) => ({
|
||||
...v,
|
||||
counts: Object.fromEntries(C.SubscriptionGroup.options.map((g) => [g, 0])),
|
||||
}),
|
||||
PathBindingCreate: (v) => ({ ...v, bindingKind: "season", seasonNumber: 1 }),
|
||||
OrganizeRequest: (v) => ({ ...v, sourcePaths: undefined }),
|
||||
FilesListQuery: (v) => ({ ...v, filter: "video,unidentified" }),
|
||||
|
||||
Reference in new issue
Block a user