Skip to content

Commit a2950dc

Browse files
authored
chore: Add snapshot tests (#78)
1 parent 422845e commit a2950dc

File tree

8 files changed

+3119
-2034
lines changed

8 files changed

+3119
-2034
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install pnpm
2020
uses: pnpm/action-setup@v3
2121
with:
22-
version: 8
22+
version: 9
2323

2424
- name: Install Node.js
2525
uses: actions/setup-node@v4

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/checkout@v4
2121
- uses: pnpm/action-setup@v3
2222
with:
23-
version: 8
23+
version: 9
2424
- name: Install Node.js
2525
uses: actions/setup-node@v4
2626
with:
@@ -44,3 +44,6 @@ jobs:
4444

4545
- name: Run tsc
4646
run: pnpm --filter @7nohe/react-app test:generated
47+
48+
- name: Run test
49+
run: pnpm test

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"build": "rimraf dist && tsc -p tsconfig.json",
1414
"preview": "npm run build && npm -C examples/react-app run generate:api",
1515
"prepublishOnly": "npm run build",
16-
"release": "npx git-ensure -a && npx bumpp --commit --tag --push"
16+
"release": "npx git-ensure -a && npx bumpp --commit --tag --push",
17+
"test": "vitest"
1718
},
1819
"repository": {
1920
"type": "git",
@@ -43,7 +44,8 @@
4344
"glob": "^10.3.10",
4445
"rimraf": "^5.0.5",
4546
"ts-morph": "^22.0.0",
46-
"typescript": "^5.3.3"
47+
"typescript": "^5.3.3",
48+
"vitest": "^1.5.0"
4749
},
4850
"peerDependencies": {
4951
"@hey-api/openapi-ts": "0.36.0",

0 commit comments

Comments
 (0)