Skip to content

Commit

Permalink
feat: test coverage reports using c8
Browse files Browse the repository at this point in the history
  • Loading branch information
cahnory committed Nov 5, 2023
1 parent 9361174 commit b3141e1
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 25 deletions.
1 change: 1 addition & 0 deletions apps/node-sample/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/coverage
5 changes: 3 additions & 2 deletions apps/node-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
"lint:fix:format": "prettier --write --list-different ./",
"lint:fix:semantic": "eslint ./ --fix",
"test": "pnpm test:unit",
"test:unit": "tsx japa.unit.ts"
"test:unit": "c8 --all --include src tsx japa.unit.ts"
},
"dependencies": {
"@pnpm-monorepo/sample-lib": "workspace:*"
},
"devDependencies": {
"@japa/expect": "3.0.0-1",
"@japa/runner": "3.0.0-9",
"eslint": "^8.52.0",
"c8": "^8.0.1",
"concurrently": "^8.2.2",
"eslint": "^8.52.0",
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"tsx": "^3.14.0",
Expand Down
1 change: 1 addition & 0 deletions apps/vite-sample/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/coverage
5 changes: 3 additions & 2 deletions apps/vite-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"lint:fix:format": "prettier --write --list-different ./",
"lint:fix:semantic": "eslint ./ --fix",
"test": "pnpm test:unit",
"test:unit": "vite-node japa.unit.ts"
"test:unit": "c8 --all --include src vite-node japa.unit.ts"
},
"dependencies": {
"@pnpm-monorepo/react-sample-lib": "workspace:*",
Expand All @@ -35,8 +35,9 @@
"@types/react-dom": "^18.2.13",
"@vanilla-extract/vite-plugin": "^3.9.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"eslint": "^8.52.0",
"c8": "^8.0.1",
"concurrently": "^8.2.2",
"eslint": "^8.52.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"vite": "^4.4.5",
Expand Down
1 change: 1 addition & 0 deletions libs/react-sample/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/coverage
3 changes: 2 additions & 1 deletion libs/react-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:fix:format": "prettier --write --list-different ./",
"lint:fix:semantic": "eslint ./ --fix",
"test": "pnpm test:unit",
"test:unit": "tsx japa.unit.ts"
"test:unit": "c8 --all --include src tsx japa.unit.ts"
},
"peerDependencies": {
"@vanilla-extract/css": "^1.13.0",
Expand All @@ -36,6 +36,7 @@
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@vanilla-extract/css": "^1.13.0",
"c8": "^8.0.1",
"concurrently": "^8.2.2",
"eslint": "^8.52.0",
"prettier": "^3.0.3",
Expand Down
1 change: 1 addition & 0 deletions libs/sample/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/coverage
5 changes: 3 additions & 2 deletions libs/sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
"lint:fix:format": "prettier --write --list-different ./",
"lint:fix:semantic": "eslint ./ --fix",
"test": "pnpm test:unit",
"test:unit": "tsx japa.unit.ts"
"test:unit": "c8 --all --include src tsx japa.unit.ts"
},
"devDependencies": {
"@japa/expect": "3.0.0-1",
"@japa/runner": "3.0.0-9",
"eslint": "^8.52.0",
"c8": "^8.0.1",
"concurrently": "^8.2.2",
"eslint": "^8.52.0",
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"tsx": "^3.14.0",
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"prepare": "pnpm build",
"build": "turbo run build",
"build": "turbo run --log-order grouped build",
"commit": "cz",
"dev": "turbo run dev",
"lint": "concurrently -r -g \"turbo run lint --continue\" pnpm:lint:commits pnpm:lint:rebase",
"lint": "concurrently -r -g \"turbo run --log-order grouped lint --continue\" pnpm:lint:commits pnpm:lint:rebase",
"lint:commits": "bash scripts/test-commit.sh $npm_package_config_defaultBranch",
"lint:format": "turbo run lint:format --continue",
"lint:format": "turbo run --log-order grouped lint:format --continue",
"lint:rebase": "bash scripts/test-rebase.sh $npm_package_config_defaultBranch",
"lint:semantic": "turbo run lint:semantic --continue",
"lint:types": "turbo run lint:types --continue",
"lint:fix": "turbo run lint:fix --continue",
"lint:fix:format": "turbo run lint:fix:format --continue",
"lint:fix:semantic": "turbo run lint:fix:semantic --continue",
"test": "turbo run test --continue",
"test:unit": "turbo run test:unit --continue"
"lint:semantic": "turbo run --log-order grouped lint:semantic --continue",
"lint:types": "turbo run --log-order grouped lint:types --continue",
"lint:fix": "turbo run --log-order grouped lint:fix --continue",
"lint:fix:format": "turbo run --log-order grouped lint:fix:format --continue",
"lint:fix:semantic": "turbo run --log-order grouped lint:fix:semantic --continue",
"test": "turbo run --log-order grouped test --continue",
"test:unit": "turbo run --log-order grouped test:unit --continue"
},
"devDependencies": {
"@commitlint/cli": "^18.2.0",
Expand Down
108 changes: 100 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b3141e1

Please sign in to comment.