Skip to content

Commit

Permalink
e2e: re-use server app
Browse files Browse the repository at this point in the history
  • Loading branch information
dhilt committed May 26, 2024
1 parent b9b81ea commit 78a84ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: E2e tests
run: |
npx playwright install
npx playwright test .spec.ts
npm run 2e2
- name: Artifacts
uses: actions/upload-artifact@v3
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"build": "node build",
"test": "npm run lint && npm run jest",
"app": "node app/server.js",
"playwright": "npm run playwright test example.spec.ts --headed",
"playwright": "npx playwright test .spec.ts",
"e2e": "npm run app & npm run playwright",
"prepack": "npm run build",
"checkGit": "sh ./uncommited.sh",
"prepublishOnly": "npm run checkGit && npm run test && npm run build && npm run checkGit"
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineConfig({
webServer: {
command: 'npm run app',
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
reuseExistingServer: true
},

/* Configure projects for major browsers */
Expand Down

0 comments on commit 78a84ad

Please sign in to comment.