forked from Yara724/api
fix: enforce fake_otp variable to be false while in production
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user