Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix node_env when tests run #339

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ db-generate:
make -C backend db-generate

start:
yarn run npm-run-all start
yarn run start:dev

start-prod:
make -C backend start-prod
Expand Down
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"start": "PORT=5001 nest start",
"typeorm": "typeorm-ts-node-commonjs",
"start:debug": "NODE_ENV=development PORT=5001 nest start --debug --watch",
"start:test": "NODE_ENV=test PORT=5001 nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"lint-fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
"build:frontend": "DISABLE_ESLINT_PLUGIN=true yarn workspace frontend run build",
"build": "npm-run-all --parallel build:*",
"production": "yarn workspace backend run start:prod",
"start:backend": "yarn workspace backend run start:debug",
"start:backend:dev": "yarn workspace backend run start:debug",
"start:backend:test": "yarn workspace backend run start:test",
"start:frontend": "yarn workspace frontend run start",
"start": "npm-run-all --parallel start:*",
"test": "playwright test --trace on"
"start:dev": "npm-run-all --parallel start:backend:dev start:frontend",
"start:test": "npm-run-all --parallel start:backend:test start:frontend",
"test": "playwright test --trace on"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineConfig({
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000
timeout: 5000,
},
/* Run tests in files in parallel */
fullyParallel: true,
Expand Down Expand Up @@ -88,7 +88,7 @@ export default defineConfig({

/* Run your local dev server before starting the tests */
webServer: {
command: 'npm run start',
command: 'yarn run start:test',
port: 3000,
reuseExistingServer: !process.env.CI,
env: {
Expand Down
Loading