Bootstrap mínimo do harness Vitest para o p2pix-front-end. Adiciona configuração, polyfills de DOM, e cobertura inicial de utils + 1 componente simples — apenas o que roda contra `develop` sem dependências externas. Co-authored-by: Arthur Abeilice <afa7789@gmail.com> Reviewed-on: https://git.p2pix.co/doiim/p2pix-front-end/pulls/7
41 lines
981 B
TypeScript
41 lines
981 B
TypeScript
import { fileURLToPath, URL } from 'node:url';
|
|
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
import viteConfig from './vite.config';
|
|
|
|
export default mergeConfig(
|
|
viteConfig,
|
|
defineConfig({
|
|
test: {
|
|
environment: 'happy-dom',
|
|
globals: true,
|
|
include: ['tests/**/*.{test,spec}.ts'],
|
|
exclude: [
|
|
'p2pix-smart-contracts/**',
|
|
'vendor/**',
|
|
'**/node_modules/**',
|
|
],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html', 'lcov'],
|
|
include: ['src/**/*.{ts,vue}'],
|
|
exclude: [
|
|
'src/main.ts',
|
|
'src/router/**',
|
|
'src/assets/**',
|
|
'src/generated.ts',
|
|
'src/subgraph/generated.ts',
|
|
'**/*.d.ts',
|
|
'**/__mocks__/**',
|
|
'p2pix-smart-contracts/**',
|
|
'vendor/**',
|
|
],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
}),
|
|
);
|