test: change vitest config (#7)
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
This commit is contained in:
Submodule p2pix-smart-contracts updated: 6adf8778cb...c4db98ae00
@@ -12,7 +12,10 @@
|
||||
"lint:fix": "eslint --fix",
|
||||
"format": "prettier --write \"src/**/*.{ts,vue,json}\"",
|
||||
"format:check": "prettier --check \"src/**/*.{ts,vue,json}\"",
|
||||
"wagmi:gen": "wagmi generate"
|
||||
"wagmi:gen": "wagmi generate",
|
||||
"test": "vitest run --passWithNoTests",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@floating-ui/vue": "^1.1.11",
|
||||
|
||||
40
vitest.config.ts
Normal file
40
vitest.config.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
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)),
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
Reference in New Issue
Block a user