From 910d1ab3aa4bbdbdbfdeedd32bcbc04e882c3a21 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Fri, 31 Oct 2025 06:20:52 +0100 Subject: [PATCH] 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. --- .../subscription/composables/useSubscriptionCredits.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests-ui/tests/platform/cloud/subscription/composables/useSubscriptionCredits.test.ts b/tests-ui/tests/platform/cloud/subscription/composables/useSubscriptionCredits.test.ts index 1d64129a4..11bd33445 100644 --- a/tests-ui/tests/platform/cloud/subscription/composables/useSubscriptionCredits.test.ts +++ b/tests-ui/tests/platform/cloud/subscription/composables/useSubscriptionCredits.test.ts @@ -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(() => ({