mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-04 00:42:14 +00:00
test(frontend): mock getLiveCapability and align rollback timeout
Stub GroupsView live capability API in unit tests and expect the longer system rollback request timeout; refresh pnpm-lock after dependency resolve.
This commit is contained in:
1 parent
6345b048d1
commit
85fb776151
4 files changed
+724
-735
No files matched your search
@@ -41,7 +41,11 @@ describe('admin system rollback API', () => {
|
||||
|
||||
const result = await rollback('0.1.146')
|
||||
|
||||
expect(post).toHaveBeenCalledWith('/admin/system/rollback', { version: '0.1.146' })
|
||||
expect(post).toHaveBeenCalledWith(
|
||||
'/admin/system/rollback',
|
||||
{ version: '0.1.146' },
|
||||
{ timeout: 15 * 60 * 1000 }
|
||||
)
|
||||
expect(result.need_restart).toBe(true)
|
||||
})
|
||||
|
||||
@@ -50,6 +54,10 @@ describe('admin system rollback API', () => {
|
||||
|
||||
await rollback()
|
||||
|
||||
expect(post).toHaveBeenCalledWith('/admin/system/rollback', undefined)
|
||||
expect(post).toHaveBeenCalledWith(
|
||||
'/admin/system/rollback',
|
||||
undefined,
|
||||
{ timeout: 15 * 60 * 1000 }
|
||||
)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user