UNPKG

axiom

Version:

Axiom AI SDK provides - an API to wrap your AI calls with observability instrumentation. - offline evals - online evals

154 lines (79 loc) 2.02 kB
[**axiom v0.51.1**](../../README.md) *** [axiom](../../README.md) / [evals](../README.md) / AxiomReporter # Class: AxiomReporter Custom Vitest reporter for Axiom AI evaluations. This reporter collects evaluation results and scores from tests and processes them for further analysis and reporting. ## Implements - `Reporter` ## Constructors ### Constructor > **new AxiomReporter**(): `AxiomReporter` #### Returns `AxiomReporter` ## Properties ### start > **start**: `number` = `0` *** ### startTime > **startTime**: `number` = `0` ## Methods ### onTestCaseReady() > **onTestCaseReady**(`test`): `void` Called when test case is ready to run. Called before the `beforeEach` hooks for the test are run. #### Parameters ##### test `TestCase` #### Returns `void` #### Implementation of `Reporter.onTestCaseReady` *** ### onTestRunEnd() > **onTestRunEnd**(`_testModules`, `_errors`, `_reason`): `Promise`\<`void`\> Called when the test run is finished. #### Parameters ##### \_testModules readonly `TestModule`[] ##### \_errors readonly `SerializedError`[] ##### \_reason `TestRunEndReason` #### Returns `Promise`\<`void`\> #### Implementation of `Reporter.onTestRunEnd` *** ### onTestRunStart() > **onTestRunStart**(): `void` Called when the new test run starts. #### Returns `void` #### Implementation of `Reporter.onTestRunStart` *** ### onTestSuiteReady() > **onTestSuiteReady**(`_testSuite`): `Promise`\<`void`\> Called when test suite is ready to run. Called before the `beforeAll` hooks for the test are run. #### Parameters ##### \_testSuite `TestSuite` #### Returns `Promise`\<`void`\> #### Implementation of `Reporter.onTestSuiteReady` *** ### onTestSuiteResult() > **onTestSuiteResult**(`testSuite`): `Promise`\<`void`\> Called after the test suite and its hooks are finished running. The `state` cannot be `pending`. #### Parameters ##### testSuite `TestSuite` #### Returns `Promise`\<`void`\> #### Implementation of `Reporter.onTestSuiteResult`