fix(fc2c-i): vitest needs plugin-vue to transform SFCs in router.spec
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
import { defineConfig } from 'vitest/config'
|
import { defineConfig } from 'vitest/config'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
|
||||||
|
// plugin-vue is required so specs that import router.js (which imports .vue
|
||||||
|
// SFCs) can transform those single-file components. No component is mounted
|
||||||
|
// in the suite (router.resolve / pure-logic only), so jsdom is unnecessary.
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
test: {
|
test: {
|
||||||
environment: 'node',
|
environment: 'node',
|
||||||
include: ['test/**/*.spec.js'],
|
include: ['test/**/*.spec.js'],
|
||||||
|
|||||||
Reference in New Issue
Block a user