fixed frontent test errors
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 2m37s
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 2m37s
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
|
||||
import { isParentAuthenticated, isUserLoggedIn, loginUser, initAuthSync } from '../auth'
|
||||
import { nextTick } from 'vue'
|
||||
|
||||
// Stub window.location to prevent jsdom "navigation to another Document" warnings
|
||||
// triggered when the auth store sets window.location.href on logout.
|
||||
const locationStub = { href: '', pathname: '/', assign: vi.fn(), replace: vi.fn(), reload: vi.fn() }
|
||||
Object.defineProperty(window, 'location', { value: locationStub, writable: true })
|
||||
|
||||
// Helper to mock localStorage
|
||||
global.localStorage = {
|
||||
store: {} as Record<string, string>,
|
||||
|
||||
Reference in New Issue
Block a user