Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(request): make the SSRF tests assert when DEBUG is set (#82897)

Robbie2e863d65a275
diff --git a/nodejs/src/common/utils/request.test.ts b/nodejs/src/common/utils/request.test.ts
index d768b26bffd3..82be21b4da76 100644
--- a/nodejs/src/common/utils/request.test.ts
+++ b/nodejs/src/common/utils/request.test.ts
@@ -63,6 +63,7 @@ describe('fetch', () => {
jest.mocked(dns.lookup).mockImplementation(realDnsLookup)
// NOTE: We are testing production-only features hence the override
process.env.NODE_ENV = 'production'
+ delete process.env.DEBUG
})
describe('raiseIfUserProvidedUrlUnsafe', () => {
it.each([
@@ -271,6 +272,7 @@ describe('legacyFetch', () => {
jest.mocked(dns.lookup).mockImplementation(realDnsLookup)
// NOTE: We are testing production-only features hence the override
process.env.NODE_ENV = 'production'
+ delete process.env.DEBUG
})
describe('calls', () => {