Skip to content

Commit

Permalink
Use playwright instead of vitest for E2E
Browse files Browse the repository at this point in the history
Removes E2E config for vitest/vite
  • Loading branch information
microbit-grace committed Mar 19, 2024
1 parent 179e918 commit 8c5684f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
"postinstall": "npm run theme",
"serve": "npx serve --no-clipboard -l 3000 -- build/",
"start": "vite dev",
"test:e2e:headless": "cross-env E2E_HEADLESS=1 vitest --mode e2e",
"test:e2e": "npx playwright test --ui",
"test:e2e:headless": "playwright test",
"test:e2e": "playwright test --ui",
"test": "vitest",
"theme:watch": "chakra-cli tokens src/deployment/default/theme.ts --watch",
"theme": "chakra-cli tokens src/deployment/default/theme.ts",
Expand Down
9 changes: 1 addition & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ export default defineConfig(({ mode }) => {
setupFiles: "./src/setupTests.ts",
mockReset: true,
};
const e2eTest: UserConfig["test"] = {
globals: true,
include: ["src/e2e/**/*.test.ts"],
environment: "jsdom",
testTimeout: 60_000,
hookTimeout: 30_000,
};
const config: UserConfig = {
base: process.env.BASE_URL ?? "/",
build: {
Expand All @@ -60,7 +53,7 @@ export default defineConfig(({ mode }) => {
react(),
svgr(),
],
test: mode === "e2e" ? e2eTest : unitTest,
test: unitTest,
resolve: {
alias: {
"theme-package": fs.existsSync(external)
Expand Down

0 comments on commit 8c5684f

Please sign in to comment.