updated test
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user