Make vitest run at root directory

This commit is contained in:
Takeshi Kimata
2024-05-19 20:54:52 +09:00
parent 5b7eff34cd
commit cbb5993276
6 changed files with 1951 additions and 1591 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules/
coverage/
.env

File diff suppressed because it is too large Load Diff

View File

@@ -6,9 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "vitest",
"coverage": "vitest run --coverage"
"lint": "next lint"
},
"dependencies": {
"@nextui-org/react": "^2.2.9",
@@ -36,9 +34,5 @@
"tailwind-variants": "^0.1.18",
"tailwindcss": "3.3.5",
"typescript": "5.0.4"
},
"devDependencies": {
"@vitest/coverage-v8": "^1.6.0",
"vitest": "^1.6.0"
}
}

1924
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

13
package.json Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "testplat",
"version": "1.0.0",
"private": true,
"scripts": {
"test": "vitest",
"coverage": "vitest run --coverage"
},
"devDependencies": {
"@vitest/coverage-v8": "^1.6.0",
"vitest": "^1.6.0"
}
}

10
vitest.config.ts Normal file
View File

@@ -0,0 +1,10 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
coverage: {
exclude: ['**/node_modules/**', 'docs/**', '**/.next/**'],
provider: "v8",
},
},
});