Skip to content

Commit 6fe1548

Browse files
committed
feat: add tests coverage
1 parent 60c5720 commit 6fe1548

File tree

4 files changed

+164
-2
lines changed

4 files changed

+164
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
dist
2+
dist
3+
coverage

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"pub:minor": "PUBLISH=true PUBLISH_VERSION=minor pnpm run build",
1212
"pub:major": "PUBLISH=true PUBLISH_VERSION=major pnpm run build",
1313
"test": "vitest run",
14-
"test:watch": "vitest watch"
14+
"test:watch": "vitest watch",
15+
"test:coverage": "vitest run --coverage"
1516
},
1617
"keywords": [
1718
"mobx",
@@ -46,6 +47,7 @@
4647
"@types/node": "20.14.5",
4748
"@types/react": "^18.3.3",
4849
"@vitejs/plugin-react-swc": "3.7.2",
50+
"@vitest/coverage-istanbul": "2.1.6",
4951
"eslint": "8.57.0",
5052
"js2me-eslint-config": "1.0.4",
5153
"js2me-exports-post-build-script": "2.0.14",

pnpm-lock.yaml

Lines changed: 156 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vitest.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ export default defineConfig({
88
globals: true,
99
environment: "jsdom",
1010
setupFiles: './setupTests.js',
11+
coverage: {
12+
provider: 'istanbul' // or 'v8'
13+
},
1114
},
1215
});

0 commit comments

Comments
 (0)