Skip to content

Commit

Permalink
Refactor test structure: move tests to e2e-tests directory, update Pl…
Browse files Browse the repository at this point in the history
…aywright configuration, and enhance test scripts
  • Loading branch information
tigawanna committed Dec 1, 2024
1 parent c5556f3 commit 1d807a5
Show file tree
Hide file tree
Showing 6 changed files with 492 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint . --fix",
"format": "prettier --write --ignore-unknown src",
"page": "tsx src/scripts/scafold-pages/script.ts",
"vitest": "vitest --ui",
"playwright": "playwright test --ui",
"test": "npm run vitest && npm run playwright",
"build": "tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
Expand Down Expand Up @@ -74,6 +76,8 @@
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@vitest/coverage-v8": "2.1.6",
"@vitest/ui": "2.1.6",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.14",
"dotenv": "^16.4.5",
Expand All @@ -91,6 +95,7 @@
"typescript": "~5.6.2",
"typescript-eslint": "^8.10.0",
"vite": "^5.4.9",
"vite-tsconfig-paths": "^5.1.0"
"vite-tsconfig-paths": "^5.1.0",
"vitest": "^2.1.6"
}
}
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dotenv.config({ path: path.resolve(__dirname, ".env") });
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
testDir: "./e2e-tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand Down
Loading

0 comments on commit 1d807a5

Please sign in to comment.