Skip to content

Commit 286f9a2

Browse files
committed
jest -> vitest
1 parent 453d36f commit 286f9a2

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

.github/workflows/test.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,19 @@ jobs:
3434
run: npm install
3535

3636
- name: Run tests
37-
run: npm run test:ci
38-
env:
39-
NODE_OPTIONS: '--experimental-vm-modules'
37+
run: npm run test:coverage
4038

4139
- name: Publish Test Results
42-
uses: EnricoMi/publish-unit-test-result-action@v2.18.0
40+
uses: EnricoMi/publish-unit-test-result-action@v2
4341
if: always()
4442
with:
45-
files: ./coverage/test-report/test-report.xml
43+
files:
44+
./coverage/coverage-final.json
4645

4746
- name: Publish Code Coverage
4847
uses: irongut/CodeCoverageSummary@v1.3.0
4948
with:
50-
filename: coverage/cobertura-coverage.xml
49+
filename: ./coverage/cobertura-coverage.xml
5150
badge: true
5251
format: markdown
5352
output: both

vitest.config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { defineConfig } from 'vitest/config';
22
import tsConfigPaths from 'vite-tsconfig-paths';
3-
import path from 'path';
43

54
export default defineConfig({
65
plugins: [ tsConfigPaths() ],
@@ -13,17 +12,12 @@ export default defineConfig({
1312
provider: "v8",
1413
include: [ "src/**/*.ts" ],
1514
exclude: [ "src/types/**/*.ts", "src/index.ts" ],
16-
reporter: [ "text", "json", "html" ],
15+
reporter: [ "text", "json", "html", "cobertura" ],
1716
},
1817

1918
typecheck: {
2019
enabled: true,
2120
tsconfig: "./tsconfig.json"
2221
}
23-
},
24-
resolve: {
25-
alias: {
26-
"@": path.resolve(__dirname, "./src")
27-
}
2822
}
2923
})

0 commit comments

Comments
 (0)