提交开发分支未提交代码并修正配置
This commit is contained in:
@@ -4,10 +4,14 @@ import { AxiosError, type AxiosAdapter, type AxiosResponse, type InternalAxiosRe
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
const messageError = vi.hoisted(() => vi.fn())
|
||||
const modalError = vi.hoisted(() => vi.fn())
|
||||
|
||||
vi.mock('ant-design-vue', () => ({
|
||||
message: {
|
||||
error: messageError
|
||||
},
|
||||
Modal: {
|
||||
error: modalError
|
||||
}
|
||||
}))
|
||||
|
||||
@@ -41,6 +45,7 @@ describe('api stale token handling', () => {
|
||||
beforeEach(() => {
|
||||
vi.useFakeTimers()
|
||||
messageError.mockClear()
|
||||
modalError.mockClear()
|
||||
window.history.replaceState(null, '', '/profile')
|
||||
localStorage.clear()
|
||||
sessionStorage.clear()
|
||||
@@ -114,5 +119,6 @@ describe('api stale token handling', () => {
|
||||
expect(sessionStorage.getItem('refreshToken')).toBe('new-refresh')
|
||||
expect(window.location.href).toBe(hrefBefore401)
|
||||
expect(messageError).not.toHaveBeenCalled()
|
||||
expect(modalError).not.toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user