Skip to content

Commit dad2ac3

Browse files
committed
test: add unit test and generate snapshot
1 parent f5d7e5f commit dad2ac3

File tree

62 files changed

+43084
-548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+43084
-548
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
'test',
1212
'*.cjs',
1313
'openapi-ts-request.config.ts',
14+
'vitest.config.ts',
1415
],
1516
plugins: [],
1617
parserOptions: {

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"changeset": "changeset",
3131
"lint": "eslint ./src --report-unused-disable-directives --max-warnings=0",
3232
"lint:fix": "eslint ./src --report-unused-disable-directives --max-warnings=0 --fix",
33+
"test:unit": "vitest",
3334
"test": "rm -rf ./test/apis/ ./test/mocks && npm run build && cd ./test && node ./test.js && cd ..",
3435
"test:new": "npm run build && cd ./test && node ./test.js && cd ..",
3536
"test:windows": "rimraf ./test/apis/ ./test/mocks && npm run build && cd ./test && node ./test.js && cd ..",
@@ -81,8 +82,10 @@
8182
"husky": "^9.0.11",
8283
"lint-staged": "^16.0.0",
8384
"openapi-types": "^12.1.3",
85+
"sanitize-filename": "^1.6.3",
8486
"ts-node": "^10.9.2",
85-
"typescript": "5.8.3"
87+
"typescript": "5.8.3",
88+
"vitest": "^3.2.4"
8689
},
8790
"keywords": [
8891
"openapi",

0 commit comments

Comments
 (0)