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:
parent
00f1733abe
commit
5c7c5184cf
1 changed files with 6 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue