mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 22:55:13 +00:00
test: update vitest coverage exclusions
This commit is contained in:
parent
1a9fb57532
commit
a46b0c876c
@ -1,5 +1,5 @@
|
||||
import { resolve } from 'node:path'
|
||||
import { configDefaults, defineConfig } from 'vitest/config'
|
||||
import { configDefaults, coverageConfigDefaults, defineConfig } from 'vitest/config'
|
||||
import { isWindows } from 'std-env'
|
||||
import codspeedPlugin from '@codspeed/vitest-plugin'
|
||||
|
||||
@ -16,6 +16,9 @@ export default defineConfig({
|
||||
test: {
|
||||
globalSetup: './test/setup.ts',
|
||||
setupFiles: ['./test/setup-env.ts'],
|
||||
coverage: {
|
||||
exclude: [...coverageConfigDefaults.exclude, 'packages/nuxt/src/app', 'playground', '**/test/', 'scripts', 'vitest.nuxt.config.ts']
|
||||
},
|
||||
testTimeout: isWindows ? 60000 : 10000,
|
||||
// Excluded plugin because it should throw an error when accidentally loaded via Nuxt
|
||||
exclude: [...configDefaults.exclude, 'nuxt/**', '**/test.ts', '**/this-should-not-load.spec.js'],
|
||||
|
@ -3,6 +3,9 @@ import { defineVitestConfig } from '@nuxt/test-utils/config'
|
||||
export default defineVitestConfig({
|
||||
test: {
|
||||
dir: './test/nuxt',
|
||||
coverage: {
|
||||
include: ['packages/nuxt/src/app']
|
||||
},
|
||||
environment: 'nuxt',
|
||||
environmentOptions: {
|
||||
nuxt: {
|
||||
|
Loading…
Reference in New Issue
Block a user