UNPKG

@arizeai/phoenix-client

Version:
34 lines 1.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.printSuiteSummaries = exports.formatSuiteSummary = void 0; const report_run_1 = require("../testing/report-run"); const reporter_format_1 = require("../testing/reporter-format"); Object.defineProperty(exports, "formatSuiteSummary", { enumerable: true, get: function () { return reporter_format_1.formatSuiteSummary; } }); Object.defineProperty(exports, "printSuiteSummaries", { enumerable: true, get: function () { return reporter_format_1.printSuiteSummaries; } }); /** * 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`. */ class PhoenixVitestReporter { constructor() { this.report = new report_run_1.SuiteSummaryReportRun(); } onTestRunStart() { this.report.begin(); } onTestRunEnd() { this.report.finish(); } // Vitest also calls `onFinished` on legacy reporters; alias for safety. onFinished() { this.report.finish(); } } exports.default = PhoenixVitestReporter; //# sourceMappingURL=reporter.js.map