From 556132d3ffe4ebcea47efaf09906b4f644b44797 Mon Sep 17 00:00:00 2001 From: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Date: Sat, 1 Nov 2025 08:43:15 +0100 Subject: [PATCH] Fix unit tests in rh test (#6479) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This pull request makes a minor adjustment to the test setup for `useSubscriptionCredits`. The change ensures that the actual Pinia store implementation is used for `firebaseAuthStore` rather than a mocked version, which can help improve the reliability and accuracy of the tests. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6479-Fix-unit-tests-in-rh-test-29d6d73d365081be8a54c260b2ce10fe) by [Unito](https://www.unito.io) --- .../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(() => ({