Skip to content

Commit 8adf106

Browse files
committed
chore: add command with native tests + coverage
1 parent a4461ae commit 8adf106

3 files changed

Lines changed: 967 additions & 15 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ tests/fixture/router.ts
99
/tests/**/generated-*.yaml
1010

1111
# Ignore coverage reports
12-
lcov.info
12+
lcov.info
13+
coverage
14+
.nyc_output

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,20 @@
1414
"build": "tsc --project ./tsconfig.build.json",
1515
"postbuild": "mkdir build/template/ && cp src/template/express.ts.hbs build/template/express.ts.hbs",
1616
"test": "bun test --coverage --coverage-reporter=text --coverage-reporter=lcov",
17+
"testbis": "nyc node --import tsx --experimental-test-coverage --test tests/**/**.test.ts",
18+
"test:coverage": "yarn testbis && nyc report --reporter=html && open coverage/index.html",
1719
"lint": "prettier --write . && eslint --fix ."
1820
},
1921
"engines": {
2022
"node": ">=18.15.0"
2123
},
24+
"dependencies": {
25+
"debug": "4.4.3",
26+
"glob": "13.0.0",
27+
"handlebars": "4.7.8",
28+
"ts-morph": "27.0.2",
29+
"yamljs": "0.3.0"
30+
},
2231
"devDependencies": {
2332
"@types/debug": "4.1.12",
2433
"@types/express": "5.0.6",
@@ -33,18 +42,13 @@
3342
"eslint-plugin-prettier": "5.5.5",
3443
"eslint-plugin-unicorn": "62.0.0",
3544
"express": "4.17.1",
45+
"nyc": "17.1.0",
3646
"openapi-types": "12.1.3",
3747
"prettier": "3.8.0",
3848
"supertest": "7.2.2",
49+
"tsx": "4.21.0",
3950
"typescript": "5.9.3",
4051
"typescript-eslint": "8.53.0"
4152
},
42-
"dependencies": {
43-
"debug": "4.4.3",
44-
"glob": "13.0.0",
45-
"handlebars": "4.7.8",
46-
"ts-morph": "27.0.2",
47-
"yamljs": "0.3.0"
48-
},
4953
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
5054
}

0 commit comments

Comments
 (0)