Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
node-version: 24.x

- run: npm install --no-package-lock
- name: Install Playwright for testing
run: npx playwright install --with-deps

- run: npm test

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"scripts": {
"build": "rimraf dist/ && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p tsconfig.web.json",
"pretest": "npm run build",
"pretest": "npx playwright install chromium && npm run build",
"test": "vitest --run",
"prepare": "npm run build",
"storybook": "storybook dev -p 6006",
Expand Down Expand Up @@ -48,16 +48,17 @@
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^5.0.4",
"@vitest/browser": "^3.2.4",
"playwright": "^1.55.1",
"@vitest/browser": "^4.1.1",
"@vitest/browser-playwright": "^4.1.1",
"playwright": "~1.58",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^3.0.0",
"storybook": "^9.1.10",
"typescript": "^5.9.3",
"vite": "^7.1.8",
"vite-plugin-checker": "^0.11.0",
"vitest": "^3.2.4"
"vitest": "^4.1.1"
},
"peerDependencies": {
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
13 changes: 7 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import checker from 'vite-plugin-checker';
import { playwright } from '@vitest/browser-playwright'

export default defineConfig({
plugins: [
Expand All @@ -13,18 +14,18 @@ export default defineConfig({
browser: {
enabled: true,
headless: true,
provider: 'playwright',
screenshotFailures: false,
instances: [{
browser: 'chromium',
launch: {
channel: 'chrome',
provider: playwright({
launchOptions: {
args: [
'--autoplay-policy=no-user-gesture-required',
'--disable-web-security',
'--disable-features=IsolateOrigins,site-per-process'
]
}
}),
screenshotFailures: false,
instances: [{
browser: 'chromium',
}]
},
setupFiles: ['.storybook/vitest.setup.ts'],
Expand Down