WIP: unverified Codex job issue-485-obzs08at

このコミットが含まれているのは:
Codex Night Worker
2026-11-21 01:11:13 +09:00
コミット 1c0cc28dd1
5個のファイルの変更、61行の追加、14行の削除
+10 -2
ファイルの表示
@@ -127,15 +127,23 @@ describe ('prefetchForURL', () => {
.toEqual ({ versions: [], count: 0 })
})
it ('prefetches unfiltered post history with its own cache key', async () => {
it ('keeps one post history separate from unfiltered history in the cache', async () => {
const client = qc ()
const params = { page: 2, limit: 5 }
const postParams = { ...params, post: '12' }
const history = { versions: [], count: 7 }
postsApi.fetchPostChanges.mockResolvedValueOnce (history)
await prefetchForURL (client, '/ja/posts/changes?id=12&page=2&limit=5')
await prefetchForURL (client, '/ja/posts/changes?page=2&limit=5')
expect (postsApi.fetchPostChanges).toHaveBeenCalledExactlyOnceWith (params, 'ja')
expect (postsApi.fetchPostChanges).toHaveBeenCalledTimes (2)
expect (postsApi.fetchPostChanges).toHaveBeenNthCalledWith (1, postParams, 'ja')
expect (postsApi.fetchPostChanges).toHaveBeenNthCalledWith (2, params, 'ja')
expect (client.getQueryData (postsKeys.changes (postParams, 'ja'))).toEqual (history)
expect (client.getQueryData (postsKeys.changes (params, 'ja')))
.toEqual ({ versions: [], count: 0 })
expect (client.getQueryCache ().getAll ()).toHaveLength (2)
})
it ('prefetches tag indexes from query parameters', async () => {