[Test] Run unittest with vitest (#2779)

This commit is contained in:
Chenlei Hu
2025-02-28 22:09:17 -05:00
committed by GitHub
parent 7d92e453ef
commit a814f9f902
33 changed files with 293 additions and 4114 deletions

View File

@@ -1,10 +1,12 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { _for_testing } from '@/composables/widgets/useFloatWidget'
jest.mock('@/scripts/widgets', () => ({
addValueControlWidgets: jest.fn()
vi.mock('@/scripts/widgets', () => ({
addValueControlWidgets: vi.fn()
}))
jest.mock('@/stores/settingStore', () => ({
vi.mock('@/stores/settingStore', () => ({
useSettingStore: () => ({
settings: {}
})