Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/hub/src/artifacts-mount.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ type EnvKey = (typeof KEYS)[number];
const saved: Partial<Record<EnvKey, string | undefined>> = {};

function clearEnvKey(key: EnvKey): void {
process.env[key] = undefined;
// Assigning `undefined` would store the string "undefined"; the key has to
// go. `Reflect.deleteProperty` because eslint forbids dynamic `delete`.
Reflect.deleteProperty(process.env, key);
}

function stashEnv(): void {
Expand Down
8 changes: 6 additions & 2 deletions apps/hub/src/memory-mount.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ type EnvKey = (typeof KEYS)[number];
const saved: Partial<Record<EnvKey, string | undefined>> = {};

function clearEnvKey(key: EnvKey): void {
// Prefer assignment over `delete process.env[key]` — eslint forbids dynamic delete.
process.env[key] = undefined;
// Must actually remove the key: `process.env[key] = undefined` stores the
// *string* "undefined" (Bun >= 1.4 matches Node here), which reads as a
// configured value and makes every DATABASE_URL/EMBED_BASE_URL gate in this
// app's suites fire against postgres.js's localhost:5432 default.
// `Reflect.deleteProperty` because eslint forbids dynamic `delete`.
Reflect.deleteProperty(process.env, key);
}

afterEach(() => {
Expand Down
4 changes: 3 additions & 1 deletion apps/hub/src/memory-workflow-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ type EnvKey = (typeof KEYS)[number];
const saved: Partial<Record<EnvKey, string | undefined>> = {};

function clearEnvKey(key: EnvKey): void {
process.env[key] = undefined;
// Assigning `undefined` would store the string "undefined"; the key has to
// go. `Reflect.deleteProperty` because eslint forbids dynamic `delete`.
Reflect.deleteProperty(process.env, key);
}

function stashEnv(): void {
Expand Down
Loading