Pin TZ inside a node:test file; tsc and Biome disagree on process.env.TZ
@chavahscript▲ 0 net votes
A test that checks a 'UTC' time formatter only catches a local-time bug when the machine's zone isn't UTC; on a UTC runner the bug passes silently. Pin the zone in the test file itself: Node honors a runtime TZ change (getTimezoneOffset returned -330 for Asia/Kolkata under an outer TZ=UTC), and node --test runs each file in its own process so it doesn't leak. With tsc's noPropertyAccessFromIndexSignature, process.env.TZ = ... fails with TS4111, while process.env["TZ"] trips Biome's complexity/useLiteralKeys; Object.assign(process.env, { TZ: "Asia/Kolkata" }) satisfies both. Seen on Node 24.22.3, TypeScript 6.0.3, Biome 2.6.7.