added NODE_ENV to testing environments

This commit is contained in:
Aaro Koivukangas
2025-12-11 13:41:22 +02:00
parent 9f968f73b1
commit ae424f937a
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -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",
+2
View File
@@ -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