fix: enforce fake_otp variable to be false while in production

This commit is contained in:
SepehrYahyaee
2026-10-19 11:11:05 +03:30
parent 887b514983
commit e414a97c92
4 changed files with 21 additions and 1 deletions
@@ -885,5 +885,11 @@ describe("Swagger and local validation", () => {
expect(() =>
validate({ ...base, OPENAI_PRICE_ESTIMATION_TIMEOUT_MS: 600001 }),
).toThrow();
expect(() =>
validate({ ...base, NODE_ENV: "production", FAKE_OTP: "true" }),
).toThrow("FAKE_OTP must be disabled in production");
expect(() =>
validate({ ...base, NODE_ENV: "production", FAKE_OTP: "false" }),
).not.toThrow();
});
});