Skip to content

Commit b0e3621

Browse files
DrJKLampcode-com
andcommitted
fix: use ref for needsLogin in bootstrapStore test mock
Amp-Thread-ID: https://ampcode.com/threads/T-019c016a-baa6-7127-87d4-6fa48ff4de74 Co-authored-by: Amp <amp@ampcode.com>
1 parent 1c4ff1a commit b0e3621

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stores/bootstrapStore.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ vi.mock('@/platform/workflow/management/stores/workflowStore', () => ({
4242
}))
4343
}))
4444

45+
const mockNeedsLogin = ref(false)
4546
vi.mock('@/stores/userStore', () => ({
4647
useUserStore: vi.fn(() => ({
4748
initialize: vi.fn().mockResolvedValue(undefined),
48-
needsLogin: false
49+
needsLogin: mockNeedsLogin
4950
}))
5051
}))
5152

@@ -65,6 +66,7 @@ describe('bootstrapStore', () => {
6566
beforeEach(() => {
6667
mockIsSettingsReady.value = false
6768
mockIsFirebaseInitialized.value = false
69+
mockNeedsLogin.value = false
6870
mockDistributionTypes.isCloud = false
6971
setActivePinia(createTestingPinia({ stubActions: false }))
7072
vi.clearAllMocks()

0 commit comments

Comments
 (0)