Skip to content

Commit

Permalink
test: begin adding test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
cshawaus committed Feb 24, 2024
1 parent b56d4dc commit ad2673d
Show file tree
Hide file tree
Showing 9 changed files with 685 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
lib/
lib/
src/**/__snapshots__
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint our source code
- name: Lint
run: pnpm lint

- name: Test
run: pnpm test:coverage

- name: Build
run: pnpm build
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint our source code
run: pnpm lint

- name: Build
run: pnpm build

Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
"lint": "eslint --ext .ts src/**",
"lint": "eslint --ext .ts 'src/**'",
"prepare": "husky",
"semantic-release": "semantic-release"
"semantic-release": "semantic-release",
"test": "vitest",
"test:ui": "vitest --ui --coverage.enabled=true",
"test:coverage": "vitest run --coverage"
},
"commitlint": {
"extends": [
Expand Down Expand Up @@ -88,6 +91,8 @@
"@types/node": "^20.11.20",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@vitest/coverage-v8": "^1.3.1",
"@vitest/ui": "^1.3.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-node": "^11.1.0",
Expand All @@ -96,7 +101,8 @@
"prettier": "^3.2.5",
"semantic-release": "^23.0.2",
"tsup": "^8.0.2",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^1.3.1"
},
"peerDependencies": {
"vite": "^5.0.0"
Expand Down
Loading

0 comments on commit ad2673d

Please sign in to comment.