diff --git a/Seasoned.Frontend/test/GalleryPage.spec.ts b/Seasoned.Frontend/test/GalleryPage.spec.ts index b7186ad..20c8f62 100644 --- a/Seasoned.Frontend/test/GalleryPage.spec.ts +++ b/Seasoned.Frontend/test/GalleryPage.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest' import { mount } from '@vue/test-utils' import { nextTick } from 'vue' +import { ref } from 'vue' import { createVuetify } from 'vuetify' import { flushPromises } from '@vue/test-utils' import * as components from 'vuetify/components' @@ -36,6 +37,11 @@ vi.stubGlobal('$fetch', mockFetch) const mockNavigate = vi.fn() vi.stubGlobal('navigateTo', mockNavigate) +vi.stubGlobal('useState', (key, init) => { + const state = ref(init ? init() : null) + return state +}) + describe('GalleryPage.vue', () => { beforeEach(() => { vi.clearAllMocks()