Skip to content

Commit 6d7fb25

Browse files
committed
e2e: re-use server app
1 parent b9b81ea commit 6d7fb25

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: E2e tests
4545
run: |
4646
npx playwright install
47-
npx playwright test .spec.ts
47+
npm run e2e
4848
4949
- name: Artifacts
5050
uses: actions/upload-artifact@v3

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"build": "node build",
3232
"test": "npm run lint && npm run jest",
3333
"app": "node app/server.js",
34-
"playwright": "npm run playwright test example.spec.ts --headed",
34+
"playwright": "npx playwright test .spec.ts",
35+
"e2e": "npm run app & npm run playwright",
3536
"prepack": "npm run build",
3637
"checkGit": "sh ./uncommited.sh",
3738
"prepublishOnly": "npm run checkGit && npm run test && npm run build && npm run checkGit"

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineConfig({
2929
webServer: {
3030
command: 'npm run app',
3131
url: 'http://127.0.0.1:3000',
32-
reuseExistingServer: !process.env.CI,
32+
reuseExistingServer: true
3333
},
3434

3535
/* Configure projects for major browsers */

0 commit comments

Comments
 (0)