fix(test): seriesManage reorder spec must not JSON.parse the bodyless GET refresh
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ describe('seriesManage', () => {
|
|||||||
s.pages = [{ image_id: 1 }, { image_id: 2 }, { image_id: 3 }]
|
s.pages = [{ image_id: 1 }, { image_id: 2 }, { image_id: 3 }]
|
||||||
const calls = []
|
const calls = []
|
||||||
stubFetch((url, init) => {
|
stubFetch((url, init) => {
|
||||||
calls.push({ url, body: JSON.parse(init.body) })
|
calls.push({ url, body: init.body ? JSON.parse(init.body) : null })
|
||||||
if (url.includes('/reorder')) return { status: 200, body: { ok: true } }
|
if (url.includes('/reorder')) return { status: 200, body: { ok: true } }
|
||||||
return { status: 200, body: { series: { id: 7, name: 'V' }, pages: [] } }
|
return { status: 200, body: { series: { id: 7, name: 'V' }, pages: [] } }
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user