Skip to content

Commit afc0dd1

Browse files
authored
Merge pull request #32 from codeskills-dev/chore/use-vitest
chore: Replace Jest with Vitest
2 parents 74a9635 + 9b92113 commit afc0dd1

File tree

8 files changed

+3151
-3199
lines changed

8 files changed

+3151
-3199
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v3
1212
- uses: pnpm/action-setup@v2
13-
with:
14-
version: 7
1513
- uses: actions/setup-node@v3
1614
with:
17-
node-version: 16.x
15+
node-version: 20.x
1816
cache: "pnpm"
1917

2018
- run: pnpm install --frozen-lockfile

.github/workflows/publish.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v3
1919
- uses: pnpm/action-setup@v2
20-
with:
21-
version: 7
2220
- uses: actions/setup-node@v3
2321
with:
24-
node-version: 16.x
22+
node-version: 20.x
2523
cache: "pnpm"
2624

2725
- run: pnpm install --frozen-lockfile

__tests__/tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"types": [
5+
"vitest/globals"
6+
]
7+
},
8+
"include": [
9+
"."
10+
]
11+
}

jest.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"build": "tsup",
2525
"lint": "tsc",
2626
"release": "pnpm run build && changeset publish",
27-
"test": "jest --coverage",
28-
"test:watch": "jest --watch"
27+
"test": "vitest run --coverage",
28+
"test:watch": "vitest"
2929
},
3030
"author": {
3131
"name": "Paul Ehikhuemen",
@@ -36,14 +36,14 @@
3636
"devDependencies": {
3737
"@changesets/cli": "^2.26.2",
3838
"@react-email/render": "0.0.7",
39-
"@types/jest": "29.5.2",
4039
"@types/react": "18.2.8",
41-
"jest": "29.5.0",
40+
"@vitest/coverage-v8": "2.1.8",
41+
"happy-dom": "^15.11.7",
4242
"react": "18.2.0",
43-
"ts-jest": "29.1.0",
4443
"ts-node": "10.9.1",
4544
"tsup": "6.7.0",
46-
"typescript": "5.1.3"
45+
"typescript": "5.1.3",
46+
"vitest": "2.1.8"
4747
},
4848
"peerDependencies": {
4949
"react": "18.x"
@@ -53,5 +53,6 @@
5353
},
5454
"publishConfig": {
5555
"access": "public"
56-
}
56+
},
57+
"packageManager": "[email protected]+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
5758
}

0 commit comments

Comments
 (0)