: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
// Shared Vitest test options for Trunk Flaky Tests uploads. Imported and spread
// into each package's `test` block so the junit reporter and retry policy stay
// defined in one place. See the upload steps in the monorepo root's
// .github/workflows/desktop-test.yml.
//
// `outputFile` is relative, so each config writes ./junit.xml next to itself;
// CI globs apps/*/junit.xml and packages/*/junit.xml. The explicit type keeps
// the reporter tuple assignable across the Vitest 2.x and 4.x versions in use.
export const trunkTestOptions: {
retry: number;
reporters: (string | [string, Record<string, unknown>])[];
} = {
// Disable retries so flaky-test detection sees raw pass/fail results.
retry: 0,
reporters: [
"default",
["junit", { outputFile: "./junit.xml", addFileAttribute: true }],
],
};