Hermetiska integrationstester + auto-hushall i onboarding (size, i18n, locations)

This commit is contained in:
Sven (AAMOS AI)
2026-08-06 22:06:11 +07:00
parent dd66ebedbf
commit 3696aadf98
12 changed files with 9079 additions and 44 deletions
+15
View File
@@ -0,0 +1,15 @@
/**
* Hermetic test environment for API integration tests.
* Must run BEFORE any application module is imported so that `loadConfig`
* sees deterministic values instead of whatever happens to be in `.env`.
*/
process.env.NODE_ENV = "test";
process.env.AAMOS_MODE = "mock";
process.env.EMAIL_MODE = "log";
process.env.S3_MODE = "mock";
process.env.LOG_LEVEL = "error";
// Local test database fallback tests still need a Postgres instance, but
// the connection string is not a secret and the value is predictable.
process.env.TEST_DATABASE_URL ||= "postgres://app_user:app_dev_password@localhost:5432/cibello_test";
process.env.DATABASE_URL = process.env.TEST_DATABASE_URL;