You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.6 KiB

import { configDefaults, defineConfig, coverageConfigDefaults } from "vitest/config";
import { resolve } from "path";
const src = "src";
export default defineConfig({
test: {
alias: {
"@xyx-utils/vue3": resolve(process.cwd(), "packages/vue3/" + src),
"@xyx-utils/shared": resolve(process.cwd(), "packages/shared/" + src),
"@xyx-utils/browser": resolve(process.cwd(), "packages/browser/" + src),
"@xyx-utils/core": resolve(process.cwd(), "packages/core/" + src),
"@xyx-utils/node": resolve(process.cwd(), "packages/node/" + src),
"xyx-utils": resolve(process.cwd(), "packages/xyx-utils/" + src),
},
globals: true,
exclude: [...configDefaults.exclude, "packages/**/*.md"],
include: [
"src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}",
"src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}",
],
coverage: {
provider: "v8",
enabled: true,
include: [
"packages/vue3/src/**",
"packages/browser/src/**",
"packages/shared/src/**",
"packages/core/src/**",
"packages/node/src/**",
"packages/xyx-utils/src/**",
],
exclude: [...coverageConfigDefaults.exclude, "packages/**/docs/**", "packages/**\/test?(s)/**"],
thresholds: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
},
testTimeout: 10000
},
});