: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
module.exports = {
transform: {
'^.+\\.[cm]?[jt]s$': ['@swc/jest'],
},
// posthog-js's rrweb subpath entries are shipped as ESM; let them through to the transform.
transformIgnorePatterns: ['node_modules/(?!.*posthog-js/dist/rrweb)'],
testEnvironment: 'node',
// Wraps the describe/it/test globals to enforce .test_quarantine.json jest entries.
setupFilesAfterEnv: ['../../frontend/jest.quarantine.ts', '../../.github/scripts/jest-retries.cjs'],
clearMocks: true,
testMatch: ['<rootDir>/src/**/*.test.ts'],
// CI sets JEST_JUNIT_OUTPUT_DIR to collect junit for the Trunk quarantine gate.
reporters: process.env.JEST_JUNIT_OUTPUT_DIR ? ['default', 'jest-junit'] : ['default'],
}