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.

fix(test): mock delay in logsIngestionLogic and tracingIngestionLogic tests (#61734)

mendral-app[bot]66cd0c7c5d35
diff --git a/products/logs/frontend/components/SetupPrompt/logsIngestionLogic.test.ts b/products/logs/frontend/components/SetupPrompt/logsIngestionLogic.test.ts
index 5e563180868d..bd4a9b47ed41 100644
--- a/products/logs/frontend/components/SetupPrompt/logsIngestionLogic.test.ts
+++ b/products/logs/frontend/components/SetupPrompt/logsIngestionLogic.test.ts
@@ -5,6 +5,11 @@ import { initKeaTests } from '~/test/init'
import { logsIngestionLogic } from './logsIngestionLogic'
+jest.mock('lib/utils', () => ({
+ ...jest.requireActual('lib/utils'),
+ delay: () => Promise.resolve(),
+}))
+
describe('logsIngestionLogic', () => {
let logic: ReturnType<typeof logsIngestionLogic.build>
diff --git a/products/tracing/frontend/components/SetupPrompt/tracingIngestionLogic.test.ts b/products/tracing/frontend/components/SetupPrompt/tracingIngestionLogic.test.ts
index 33b7add760e8..6d83b02d9057 100644
--- a/products/tracing/frontend/components/SetupPrompt/tracingIngestionLogic.test.ts
+++ b/products/tracing/frontend/components/SetupPrompt/tracingIngestionLogic.test.ts
@@ -5,6 +5,11 @@ import { initKeaTests } from '~/test/init'
import { tracingIngestionLogic } from './tracingIngestionLogic'
+jest.mock('lib/utils', () => ({
+ ...jest.requireActual('lib/utils'),
+ delay: () => Promise.resolve(),
+}))
+
describe('tracingIngestionLogic', () => {
let logic: ReturnType<typeof tracingIngestionLogic.build>