chore(web): address Copilot review on #2155

Give the test's paginated-list fixture a precise return type instead of
an unjustified double cast. The cast was hiding that the fixture omitted
`error`, so an interface change would not have been type-checked there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013hzwzS8UvBsr4yZm7o7sev
Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
cliffhall 2026-08-27 20:35:33 -04:00
commit 5c7c5184cf

View file

@ -110,16 +110,19 @@ const authError = () =>
reason: "unauthorized",
});
function pagination<T>(over: Partial<PaginatedListModel<T>> = {}) {
function pagination<T>(
over: Partial<PaginatedListModel<T>> = {},
): PaginatedListModel<T> {
return {
items: [] as T[],
items: [],
paginated: false,
canLoadMore: false,
loadedPages: 1,
error: null,
onRefresh: vi.fn().mockResolvedValue(undefined),
onLoadMore: vi.fn().mockResolvedValue(undefined),
...over,
} as unknown as PaginatedListModel<T>;
};
}
interface HarnessProps {