fix lint and type error
This commit is contained in:
@@ -137,7 +137,7 @@ describe('useUserManageStore', () => {
|
||||
it('sets loading to false and shows error message on failure', async () => {
|
||||
const { api } = await import('@/utils/request')
|
||||
vi.mocked(api.get).mockRejectedValueOnce(new Error('Network error'))
|
||||
const errorSpy = vi.spyOn(message, 'error').mockImplementation(() => ({}) as any)
|
||||
const errorSpy = vi.spyOn(message, 'error').mockImplementation(() => ({}) as never)
|
||||
|
||||
const store = useUserManageStore()
|
||||
await store.fetchUsers()
|
||||
|
||||
@@ -175,7 +175,7 @@ describe('UserFormModal', () => {
|
||||
|
||||
// 验证 PUT payload 包含 status 且不包含 ext
|
||||
expect(api.put).toHaveBeenCalledOnce()
|
||||
const [url, payload] = vi.mocked(api.put).mock.calls[0]
|
||||
const [url, payload] = vi.mocked(api.put).mock.calls[0]!
|
||||
expect(url).toContain('/api/v1/users/')
|
||||
expect(payload).toHaveProperty('status')
|
||||
expect(payload).not.toHaveProperty('ext')
|
||||
|
||||
Reference in New Issue
Block a user