WIP: unverified Codex job issue-485-z473g006

このコミットが含まれているのは:
Codex Night Worker
2026-11-20 00:50:34 +09:00
コミット 9d42fc7f5f
3個のファイルの変更、90行の追加、24行の削除
+17 -4
ファイルの表示
@@ -89,8 +89,10 @@ describe ('prefetchForURL', () => {
expect (postsApi.fetchPost).toHaveBeenCalledWith ('12', 'ja')
})
it.each (['/posts/changes', '/ja/posts/changes']) (
'prefetches post history with matching filters and cache key at %s', async path => {
it.each ([
['/posts/changes', 'ja'], ['/ja/posts/changes', 'ja'],
['/ain-Kana/posts/changes', 'ain-Kana']] as const) (
'matches post history filters and cache key at %s', async (path, locale) => {
const client = qc ()
const params = { post: '12', page: 2, limit: 5 }
const history = { versions: [], count: 7 }
@@ -98,8 +100,8 @@ describe ('prefetchForURL', () => {
await prefetchForURL (client, `${path}?id=12&page=2&limit=5`)
expect (postsApi.fetchPostChanges).toHaveBeenCalledExactlyOnceWith (params, 'ja')
expect (client.getQueryData (postsKeys.changes (params, 'ja'))).toEqual (history)
expect (postsApi.fetchPostChanges).toHaveBeenCalledExactlyOnceWith (params, locale)
expect (client.getQueryData (postsKeys.changes (params, locale))).toEqual (history)
expect (client.getQueryCache ().getAll ()).toHaveLength (1)
})
@@ -114,6 +116,17 @@ describe ('prefetchForURL', () => {
.toEqual ({ versions: [], count: 0 })
})
it ('preserves an external tag filter when prefetching one post history', async () => {
const client = qc ()
const params = { post: '12', externalTag: '7', page: 1, limit: 20 }
await prefetchForURL (client, '/ja/posts/changes?id=12&external_tag=7')
expect (postsApi.fetchPostChanges).toHaveBeenCalledExactlyOnceWith (params, 'ja')
expect (client.getQueryData (postsKeys.changes (params, 'ja')))
.toEqual ({ versions: [], count: 0 })
})
it ('prefetches unfiltered post history with its own cache key', async () => {
const client = qc ()
const params = { page: 2, limit: 5 }