diff --git a/backend/package.json b/backend/package.json index ef44e9b..c5372c8 100644 --- a/backend/package.json +++ b/backend/package.json @@ -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", diff --git a/compose.local-test.yaml b/compose.local-test.yaml index bb7f7d9..c79f239 100644 --- a/compose.local-test.yaml +++ b/compose.local-test.yaml @@ -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