UNPKG

@arizeai/phoenix-client

Version:
27 lines 1.02 kB
import { SuiteSummaryReportRun } from "../testing/report-run.js"; import { formatSuiteSummary, printSuiteSummaries, } from "../testing/reporter-format.js"; /** * Vitest reporter for `@arizeai/phoenix-client/vitest`. * * The reporter does not replace Vitest's default test output. Instead it * appends a Phoenix-flavored summary at the end of the run that lists * outputs, annotations, and dataset/experiment links for each suite. * * The class implements the Vitest `Reporter` interface structurally rather * than nominally so we don't have to import a CJS type from `vitest/reporters`. */ export default class PhoenixVitestReporter { report = new SuiteSummaryReportRun(); onTestRunStart() { this.report.begin(); } onTestRunEnd() { this.report.finish(); } // Vitest also calls `onFinished` on legacy reporters; alias for safety. onFinished() { this.report.finish(); } } export { formatSuiteSummary, printSuiteSummaries }; //# sourceMappingURL=reporter.js.map