Skip to content

Commit 0b28e75

Browse files
committed
✅ test: fix test
1 parent b197f95 commit 0b28e75

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
coverage

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"dev": "vite",
1212
"lint": "eslint \"{src,api,docs}/**/*.{js,jsx,ts,tsx}\" --fix",
1313
"preview": "vite preview",
14+
"test": "vitest --passWithNoTests",
15+
"test:coverage": "vitest --coverage --passWithNoTests",
1416
"type-check": "tsc --noEmit"
1517
},
1618
"dependencies": {
@@ -29,6 +31,7 @@
2931
"@types/react": "^18.2.15",
3032
"@types/react-dom": "^18.2.7",
3133
"@vitejs/plugin-react-swc": "^3.3.2",
34+
"@vitest/coverage-v8": "latest",
3235
"commitlint": "^17",
3336
"eslint": "^8.45.0",
3437
"eslint-plugin-react-hooks": "^4.6.0",
@@ -39,6 +42,7 @@
3942
"semantic-release": "^21",
4043
"stylelint": "^15",
4144
"typescript": "^5.0.2",
42-
"vite": "^4.4.5"
45+
"vite": "^4.4.5",
46+
"vitest": "latest"
4347
}
4448
}

vitest.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'vitest/config';
2+
3+
export default defineConfig({
4+
test: {
5+
environment: 'node',
6+
globals: true,
7+
},
8+
});

0 commit comments

Comments
 (0)