Skip to content

Commit 0bf0a3c

Browse files
committed
test: add unit tests for parse utils
1 parent 2381934 commit 0bf0a3c

File tree

4 files changed

+504
-4
lines changed

4 files changed

+504
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ The `pm-x` generator generates commands for running a package through JavaScript
159159
- Install the latest LTS version of [Node.js](https://nodejs.org/en/)
160160
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
161161
- Install dependencies using `pnpm install`
162-
- Run playground test using `pnpm dev`
162+
- Run unit tests using `pnpm dev`
163+
- Run playground test using `pnpm play`
163164

164165
## License
165166

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
"scripts": {
2424
"automd": "jiti src/cli.ts",
2525
"build": "unbuild",
26-
"dev": "pnpm automd --dir playground",
26+
"dev": "vitest",
27+
"play": "pnpm automd --dir playground",
2728
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src",
2829
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src -w",
2930
"prepack": "pnpm build",
3031
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags && pnpm build --stub",
31-
"test": "pnpm lint && pnpm test:types",
32+
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
3233
"test:types": "tsc --noEmit --skipLibCheck"
3334
},
3435
"dependencies": {
@@ -49,7 +50,8 @@
4950
"jiti": "^1.21.0",
5051
"prettier": "^3.1.1",
5152
"typescript": "^5.3.3",
52-
"unbuild": "^2.0.0"
53+
"unbuild": "^2.0.0",
54+
"vitest": "^1.2.2"
5355
},
5456
"packageManager": "pnpm@8.12.1"
5557
}

0 commit comments

Comments
 (0)