test: add vitest config and unit tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { vi } from 'vitest'
|
||||
|
||||
// Mock Element Plus components globally
|
||||
vi.mock('element-plus', () => ({
|
||||
ElMessage: {
|
||||
success: vi.fn(),
|
||||
error: vi.fn(),
|
||||
warning: vi.fn(),
|
||||
info: vi.fn(),
|
||||
},
|
||||
ElMessageBox: {
|
||||
confirm: vi.fn().mockResolvedValue('confirm'),
|
||||
},
|
||||
}))
|
||||
Reference in New Issue
Block a user