Peach: Local-first video metadata scraper and media manager.
test(integration): 对齐任务端点与导航测试契约
longmeidao5d768865ab60
diff --git a/frontend/test/query/client.test.tsx b/frontend/test/query/client.test.tsxindex d8a11a336..395fb124b 100644--- a/frontend/test/query/client.test.tsx+++ b/frontend/test/query/client.test.tsx@@ -38,7 +38,7 @@ it('默认选项不重试,挂载只重取已失效查询,离线也照发', (expect(queries).toMatchObject({networkMode: 'always', retry: 0, refetchOnWindowFocus: false, retryOnMount: false, gcTime: Infinity,});- const query = queryClient.getQueryCache().build(queryClient, { queryKey: ['mount-policy'] });+ const query = queryClient.getQueryCache().build(queryClient, { queryKey: ['mount-policy'] as readonly unknown[] });const refetch = queries.refetchOnMount;expect(typeof refetch).toBe('function');if (typeof refetch !== 'function') throw new Error('挂载策略没有按查询状态判断');diff --git a/frontend/test/react/pages/follow.test.tsx b/frontend/test/react/pages/follow.test.tsxindex 56997b031..3c627e8d3 100644--- a/frontend/test/react/pages/follow.test.tsx+++ b/frontend/test/react/pages/follow.test.tsx@@ -207,7 +207,7 @@ it('关注元素:后退回到关注页时列表已被收掉就整页打开,const calls = serve();let scrollTop = 0;vi.spyOn(window, 'scrollY', 'get').mockImplementation(() => scrollTop);- const scrolled = vi.spyOn(window, 'scrollTo').mockImplementation(options => {+ const scrolled = vi.spyOn(window, 'scrollTo').mockImplementation((options: number | ScrollToOptions | undefined) => {if (typeof options === 'object') scrollTop = options.top ?? scrollTop;});const { actions } = shellActions(r);diff --git a/tests/test_task_center_integration.py b/tests/test_task_center_integration.pyindex bd9db358d..0b18961bb 100644--- a/tests/test_task_center_integration.py+++ b/tests/test_task_center_integration.py@@ -502,7 +502,7 @@ class TasksEndpointTests(unittest.TestCase):"""迁移是单独一步,升级后第一次打开活动页撞上这张表不存在是正常路径。"""bare = Path(self.tmp.name) / "bare.db"sqlite3.connect(bare).close()- contract = types.SimpleNamespace(task_runs=TaskRunStore(LedgerDatabase(bare)))+ contract = web_contract.WebContract(bare)payload = web_tasks.q_tasks(contract, {})self.assertFalse(payload["available"])self.assertEqual(payload["running"], [])