Skip to content

Commit

Permalink
Add unit tests (#26)
Browse files Browse the repository at this point in the history
* Add unit tests

* Fix type check script
  • Loading branch information
kadiryazici authored Oct 19, 2022
1 parent 9c040d7 commit 1a06992
Show file tree
Hide file tree
Showing 7 changed files with 485 additions and 31 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Unit Tests

on: push

jobs:
publish:
runs-on: ubuntu-latest
name: Unit Tests
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm run test
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,26 @@
"build": "run-p type-check build-only",
"build-dev": "vite build --mode staging",
"preview": "vite preview --port 4173",
"test:unit": "vitest --environment jsdom",
"test-watch": "vitest watch --environment jsdom",
"test": "vitest run",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"devDependencies": {
"@iconify-json/carbon": "^1.1.7",
"@rushstack/eslint-patch": "^1.1.4",
"@types/jsdom": "^20.0.0",
"@types/node": "^16.11.47",
"@vitejs/plugin-vue": "^3.1.0",
"@vitejs/plugin-vue": "^3.1.2",
"@vitejs/plugin-vue-jsx": "^2.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/test-utils": "^2.0.2",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.21.0",
"eslint-plugin-vue": "^9.3.0",
"happy-dom": "^7.6.0",
"hotkeys-js": "^3.9.5",
"jsdom": "^20.0.0",
"nanoid": "^4.0.0",
Expand All @@ -67,7 +69,7 @@
"unplugin-icons": "^0.14.9",
"vite": "^3.0.4",
"vite-plugin-dts": "^1.4.1",
"vitest": "^0.21.0",
"vitest": "^0.21.1",
"vue": "^3.2.38",
"vue-selectable-items": "file:",
"vue-tsc": "1.0.7",
Expand Down
Loading

0 comments on commit 1a06992

Please sign in to comment.