mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-28 16:42:04 +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 { resolve } from 'node:path'
|
||||||
import { configDefaults, defineConfig } from 'vitest/config'
|
import { configDefaults, coverageConfigDefaults, defineConfig } from 'vitest/config'
|
||||||
import { isWindows } from 'std-env'
|
import { isWindows } from 'std-env'
|
||||||
import codspeedPlugin from '@codspeed/vitest-plugin'
|
import codspeedPlugin from '@codspeed/vitest-plugin'
|
||||||
|
|
||||||
@ -16,6 +16,9 @@ export default defineConfig({
|
|||||||
test: {
|
test: {
|
||||||
globalSetup: './test/setup.ts',
|
globalSetup: './test/setup.ts',
|
||||||
setupFiles: ['./test/setup-env.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,
|
testTimeout: isWindows ? 60000 : 10000,
|
||||||
// Excluded plugin because it should throw an error when accidentally loaded via Nuxt
|
// 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'],
|
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({
|
export default defineVitestConfig({
|
||||||
test: {
|
test: {
|
||||||
dir: './test/nuxt',
|
dir: './test/nuxt',
|
||||||
|
coverage: {
|
||||||
|
include: ['packages/nuxt/src/app']
|
||||||
|
},
|
||||||
environment: 'nuxt',
|
environment: 'nuxt',
|
||||||
environmentOptions: {
|
environmentOptions: {
|
||||||
nuxt: {
|
nuxt: {
|
||||||
|
Loading…
Reference in New Issue
Block a user