mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 09:57:47 +08:00
feat: restructure notification services
This commit is contained in:
@@ -11,6 +11,9 @@ const authStoreMock = vi.hoisted(() => ({
|
||||
}))
|
||||
|
||||
const routerPushMock = vi.hoisted(() => vi.fn())
|
||||
const routeMock = vi.hoisted(() => ({
|
||||
query: {},
|
||||
}))
|
||||
const toastMocks = vi.hoisted(() => ({
|
||||
success: vi.fn(),
|
||||
warning: vi.fn(),
|
||||
@@ -27,6 +30,7 @@ const oauthApiMocks = vi.hoisted(() => ({
|
||||
}))
|
||||
|
||||
vi.mock('vue-router', () => ({
|
||||
useRoute: () => routeMock,
|
||||
useRouter: () => ({
|
||||
push: routerPushMock,
|
||||
}),
|
||||
@@ -157,6 +161,7 @@ beforeEach(() => {
|
||||
authStoreMock.error = ''
|
||||
authStoreMock.canAccessAdmin = false
|
||||
authStoreMock.login.mockReset()
|
||||
routeMock.query = {}
|
||||
routerPushMock.mockReset()
|
||||
toastMocks.success.mockReset()
|
||||
toastMocks.warning.mockReset()
|
||||
|
||||
Reference in New Issue
Block a user