add pinia to unit tests

This commit is contained in:
bymyself
2025-06-15 22:33:43 -07:00
parent 85f0aca045
commit 2dbb237a83
2 changed files with 17 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
import { createPinia, setActivePinia } from 'pinia'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { useRegistrySearchGateway } from '@/services/gateway/registrySearchGateway'
@@ -14,6 +15,7 @@ describe('useRegistrySearchGateway', () => {
beforeEach(() => {
vi.clearAllMocks()
setActivePinia(createPinia())
consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {})
consoleInfoSpy = vi.spyOn(console, 'info').mockImplementation(() => {})
})