UNPKG

@arizeai/phoenix-client

Version:
45 lines 2.04 kB
import type { SuiteSummary } from "./reporter-format.js"; import type { SuiteState } from "./state.js"; /** * Env var that overrides where suite summary artifacts are written. When unset, * a stable per-project subdirectory of the OS temp dir is used (see * {@link getSuiteSummaryReportDir}). */ export declare const PHOENIX_TEST_REPORT_DIR_ENV_VAR = "PHOENIX_TEST_REPORT_DIR"; /** * Resolve the directory where suite summary artifacts are written and read. * * Honors {@link PHOENIX_TEST_REPORT_DIR_ENV_VAR} when set. Otherwise it derives * a directory under the OS temp dir, namespaced by a hash of the current * working directory so that concurrent test runs in different projects don't * read each other's artifacts. */ export declare function getSuiteSummaryReportDir(): string; /** * Delete any artifacts left over from a previous run. The reporter calls this * at the start of every run so summaries from an earlier watch-mode invocation * don't bleed into the next one. */ export declare function clearSuiteSummaryArtifacts(): void; /** * Write one suite's summary to the report directory. Called from each worker * when a suite finishes. * * The file is written to a `.tmp` path first and then atomically renamed into * place, so the reader never observes a half-written artifact. Failures are * intentionally swallowed — reporting must not break the user's tests. */ export declare function writeSuiteSummaryArtifact(suite: SuiteState): void; /** * Read back all suite summaries the workers wrote during this run, sorted by * suite name for stable output. * * @param sinceMs - When provided, only artifacts created at or after this * timestamp are returned, so summaries from a previous run that share the * report directory are ignored. A one-second slack is allowed to absorb * small clock differences between worker processes. */ export declare function readSuiteSummaryArtifacts({ sinceMs, }?: { sinceMs?: number; }): SuiteSummary[]; //# sourceMappingURL=report-artifacts.d.ts.map