fix(test): replace dynamic delete with Reflect.deleteProperty in withEnv

Fixes @typescript-eslint/no-dynamic-delete lint error in api-routes.test.ts
which was breaking Lint, Typecheck, and the onboarding build check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
suraj-markup 2026-03-29 03:58:38 +05:30
parent 717253cf8e
commit f82e4e6ad9
1 changed files with 2 additions and 2 deletions

View File

@ -398,7 +398,7 @@ describe("API Routes", () => {
for (const key of Object.keys(overrides)) {
saved[key] = process.env[key];
if (overrides[key] === undefined) {
delete process.env[key];
Reflect.deleteProperty(process.env, key);
} else {
process.env[key] = overrides[key];
}
@ -406,7 +406,7 @@ describe("API Routes", () => {
return fn().finally(() => {
for (const key of Object.keys(saved)) {
if (saved[key] === undefined) {
delete process.env[key];
Reflect.deleteProperty(process.env, key);
} else {
process.env[key] = saved[key];
}