test: use firebase hosting emulator

This commit is contained in:
Kim, Jimin 2023-07-29 10:41:55 +09:00
parent 17735fd855
commit cd528cd130
Signed by: pomp
GPG key ID: CE1DDB8A4A765403
9 changed files with 64 additions and 6 deletions

View file

@ -4,8 +4,8 @@
"private": true,
"scripts": {
"dev": "open-cli http://localhost:3000 && next dev",
"dev:headless": "next dev",
"build": "next build",
"serve": "cd ../.. && firebase emulators:start --only hosting --config=firebase.test.blog.json",
"lint": "next lint",
"test:e2e": "playwright test",
"clean": "rm -rf .next .turbo build node_modules test-results"

View file

@ -16,7 +16,7 @@ const config: PlaywrightTestConfig = {
// Run your local dev server before starting the tests:
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
webServer: {
command: "pnpm build && pnpm serve",
command: "pnpm serve",
url: baseURL,
timeout: 120 * 1000,
// eslint-disable-next-line turbo/no-undeclared-env-vars