fix: unmock firebaseAuthStore in useSubscriptionCredits tests for rh-test

The global mock in vitest.setup.ts (rh-test only) was preventing tests
from accessing the real Pinia store, causing balance-related tests to fail.

This mock doesn't exist in main branch, so this fix is rh-test specific.
This commit is contained in:
Johnpaul
2025-10-31 06:20:52 +01:00
parent 55d8e41d20
commit 910d1ab3aa

View File

@@ -4,6 +4,9 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
import { useSubscriptionCredits } from '@/platform/cloud/subscription/composables/useSubscriptionCredits'
import { useFirebaseAuthStore } from '@/stores/firebaseAuthStore'
// Unmock firebaseAuthStore so we get the real Pinia store
vi.unmock('@/stores/firebaseAuthStore')
// Mock Firebase Auth and related modules
vi.mock('vuefire', () => ({
useFirebaseAuth: vi.fn(() => ({