mirror of
https://github.com/UniversityOfHelsinkiCS/ohtuilmo.git
synced 2026-10-12 19:03:41 +03:00
added NODE_ENV to testing environments
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"watch:test": "cross-env NODE_ENV=test nodemon index.js",
|
||||
"start": "cross-env NODE_ENV=production node index.js",
|
||||
"test": "jest --runInBand",
|
||||
"test:local": "DATABASE_URL=postgres://postgres:postgres@localhost:6543/test_postgres SECRET=testsecret EMAIL_ENABLED=false npm run test",
|
||||
"test:local": "DATABASE_URL=postgres://postgres:postgres@localhost:6543/test_postgres SECRET=testsecret EMAIL_ENABLED=false NODE_ENV=test npm run test",
|
||||
"test-setup": "docker compose -f ../compose.local-test.yaml --profile local-api up -d --force-recreate",
|
||||
"test-setup:down": "docker compose -f ../compose.local-test.yaml --profile local-api down",
|
||||
"test:docker": "docker compose -f ../compose.local-test.yaml down && docker compose -f ../compose.local-test.yaml --profile api up --exit-code-from api-test",
|
||||
|
||||
@@ -67,6 +67,7 @@ services:
|
||||
- SECRET=yoursecrethere
|
||||
- EMAIL_ENABLED=false
|
||||
- DATABASE_URL=postgres://postgres:postgres@test-db:5432/test_postgres
|
||||
- NODE_ENV=test
|
||||
container_name: test-backend
|
||||
profiles: [local-e2e, e2e]
|
||||
depends_on:
|
||||
@@ -109,6 +110,7 @@ services:
|
||||
- SECRET=testsecret
|
||||
- EMAIL_ENABLED=false
|
||||
- PORT=3001
|
||||
- NODE_ENV=test
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
|
||||
Reference in New Issue
Block a user