Skip to content

Commit f8f13fd

Browse files
authored
add browser test with playwright for freeze (#88)
* add test * move to a folder, and update config * remove screenshot * add pnpm install chromium * use pnpx * use 6.9.1 * rebase
1 parent ede6ca8 commit f8f13fd

File tree

5 files changed

+328
-8
lines changed

5 files changed

+328
-8
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
- name: 📥 Install dependencies
3838
run: pnpm install --ignore-scripts --frozen-lockfile
3939

40+
- name: 🎭 Install Playwright browsers
41+
run: pnpx playwright install chromium
42+
4043
- name: 🔍 Type Check
4144
run: pnpm run typecheck
4245

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"demo": "vite build",
2020
"build": "tsc",
2121
"prepublishOnly": "pnpm run typecheck && pnpm run test && pnpm run build",
22-
"release": "pnpm version"
22+
"release": "pnpm version",
23+
"test:browser": "vitest --config=vitest.browser.config.ts"
2324
},
2425
"keywords": [
2526
"codemirror",
@@ -37,6 +38,8 @@
3738
"@biomejs/biome": "^2.3.2",
3839
"@codemirror/lang-sql": "^6.10.0",
3940
"@codemirror/view": "^6.38.6",
41+
"@testing-library/dom": "^10.4.1",
42+
"@vitest/browser-playwright": "^4.0.6",
4043
"@vitest/coverage-v8": "3.2.4",
4144
"codemirror": "^6.0.2",
4245
"jsdom": "^27.1.0",
@@ -74,4 +77,4 @@
7477
"dependencies": {
7578
"node-sql-parser": "^5.3.13"
7679
}
77-
}
80+
}

0 commit comments

Comments
 (0)