Skip to content

Commit 8c506a7

Browse files
committed
test: 개발서버에 대한 테스트 추가
1 parent 4731feb commit 8c506a7

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

e2e/e2e-advanced.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { createCSRTest, createSSGTest, createSSRTest } from "./createTests";
21
import test from "@playwright/test";
2+
import { createCSRTest, createSSGTest, createSSRTest } from "./createTests";
33

44
test.describe("E2E Test > 심화과제 (React)", () => {
5+
createCSRTest(`http://localhost:5175/`);
56
createCSRTest(`http://localhost:4175/front_6th_chapter4-1/react/`);
7+
createSSRTest(`http://localhost:5176/`);
68
createSSRTest(`http://localhost:4176/front_6th_chapter4-1/react/`);
79
createSSGTest(`http://localhost:4179/front_6th_chapter4-1/react/`);
810
});

e2e/e2e-basic.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import test from "@playwright/test";
22
import { createCSRTest, createSSGTest, createSSRTest } from "./createTests";
33

44
test.describe("E2E Test > 기본과제 (Vanilla Javascript)", () => {
5+
createCSRTest(`http://localhost:5173/`);
56
createCSRTest(`http://localhost:4173/front_6th_chapter4-1/vanilla/`);
7+
createSSRTest(`http://localhost:5174/`);
68
createSSRTest(`http://localhost:4174/front_6th_chapter4-1/vanilla/`);
79
createSSGTest(`http://localhost:4178/front_6th_chapter4-1/vanilla/`);
810
});

packages/react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
},
88
"type": "module",
99
"scripts": {
10-
"dev": "vite",
11-
"dev:ssr": "node server.js",
10+
"dev": "vite --port 5175",
11+
"dev:ssr": "PORT=5176 node server.js",
1212
"build:client": "rm -rf ./dist/react && vite build --outDir ./dist/react && cp ./dist/react/index.html ./dist/react/404.html",
1313
"build:client-for-ssg": "rm -rf ../../dist/react && vite build --outDir ../../dist/react",
1414
"build:server": "vite build --outDir ./dist/react-ssr --ssr src/main-server.tsx",
@@ -21,7 +21,7 @@
2121
"preview:ssr-with-build": "pnpm run build:without-ssg && pnpm run preview:ssr",
2222
"preview:ssg": "NODE_ENV=production vite preview --outDir ../../dist/react --port 4179",
2323
"preview:ssg-with-build": "pnpm run build:ssg && pnpm run preview:ssg",
24-
"serve:test": "pnpm run build:without-ssg && pnpm run build:ssg && (pnpm run preview:csr & pnpm run preview:ssr & pnpm run preview:ssg)",
24+
"serve:test": "pnpm run build:without-ssg && pnpm run build:ssg && (pnpm run dev & pnpm run dev:ssr & pnpm run preview:csr & pnpm run preview:ssr & pnpm run preview:ssg)",
2525
"tsc": "tsc --noEmit",
2626
"lint:fix": "eslint --fix ./src",
2727
"prettier:write": "prettier --write ./src"

packages/vanilla/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
8-
"dev:ssr": "node server.js",
7+
"dev": "vite --port 5173",
8+
"dev:ssr": "PORT=5174 node server.js",
99
"build:client": "rm -rf ./dist/vanilla && vite build --outDir ./dist/vanilla && cp ./dist/vanilla/index.html ./dist/vanilla/404.html",
1010
"build:client-for-ssg": "rm -rf ../../dist/vanilla && vite build --outDir ../../dist/vanilla",
1111
"build:server": "vite build --outDir ./dist/vanilla-ssr --ssr src/main-server.js",
@@ -20,7 +20,7 @@
2020
"preview:ssr-with-build": "pnpm run build:without-ssg && pnpm run preview:ssr",
2121
"preview:ssg": "vite preview --outDir ../../dist/vanilla --port 4178",
2222
"preview:ssg-with-build": "pnpm run build && pnpm run preview:ssg",
23-
"serve:test": "pnpm run build:without-ssg && pnpm run build:ssg && (pnpm run preview:csr & pnpm run preview:ssr & pnpm run preview:ssg)",
23+
"serve:test": "pnpm run build:without-ssg && pnpm run build:ssg && (pnpm run dev & pnpm run dev:ssr & pnpm run preview:csr & pnpm run preview:ssr & pnpm run preview:ssg)",
2424
"prepare": "husky"
2525
},
2626
"lint-staged": {

0 commit comments

Comments
 (0)