Skip to content

Commit 183e026

Browse files
authored
feat(test): Vitest browser mode, seperate test config for type safety (#292)
* feat(test): Vitest browser mode, seperate test config for type safety * fix(test): Added playwright to install (#293) * fix(test): Added playwright to dependencies
1 parent cdd0845 commit 183e026

7 files changed

Lines changed: 194 additions & 126 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- name: Install 🔧
3131
run: |
3232
pnpm i
33+
pnpm playwright
3334
3435
- name: Test 🧪
3536
run: |

env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/// <reference types="vite/client" />
22
/// <reference types="vitest" />
3-
/// <reference types="@testing-library/jest-dom/vitest" />
43

54
interface ImportMeta {
65
readonly env: ImportMetaEnv;

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "vite build",
99
"coverage": "vitest run --coverage",
1010
"dev": "vite",
11+
"playwright": "playwright install --only-shell chromium",
1112
"preview": "vite preview",
1213
"start": "vite",
1314
"test": "vitest run"
@@ -17,12 +18,11 @@
1718
"@eslint/css": "0.14.1",
1819
"@eslint/js": "9.39.2",
1920
"@html-eslint/eslint-plugin": "0.54.0",
20-
"@solidjs/testing-library": "0.8.10",
2121
"@stylistic/eslint-plugin": "5.7.1",
2222
"@tailwindcss/vite": "4.1.18",
23-
"@testing-library/jest-dom": "6.9.1",
2423
"@types/eslint-plugin-jsx-a11y": "6.10.1",
2524
"@types/node": "25.1.0",
25+
"@vitest/browser-playwright": "4.0.18",
2626
"@vitest/coverage-v8": "4.0.18",
2727
"eslint": "9.39.2",
2828
"eslint-config-prettier": "10.1.8",
@@ -35,6 +35,7 @@
3535
"eslint-plugin-solid": "0.14.5",
3636
"eslint-plugin-yml": "3.0.0",
3737
"happy-dom": "20.4.0",
38+
"playwright": "1.58.0",
3839
"prettier": "3.8.1",
3940
"prettier-plugin-tailwindcss": "0.7.2",
4041
"tailwindcss": "4.1.18",
@@ -43,7 +44,8 @@
4344
"vite": "8.0.0-beta.10",
4445
"vite-plugin-checker": "0.12.0",
4546
"vite-plugin-solid": "2.11.10",
46-
"vitest": "4.0.18"
47+
"vitest": "4.0.18",
48+
"vitest-browser-solid": "1.0.1"
4749
},
4850
"dependencies": {
4951
"solid-js": "1.9.11"

0 commit comments

Comments
 (0)