KC's Workspace
    Preparing search index...
    interface Reporter {
        onBrowserInit?: (project: TestProject) => Awaitable<void>;
        onCoverage?: (coverage: unknown) => Awaitable<void>;
        onHookEnd?: (hook: ReportedHookContext) => Awaitable<void>;
        onHookStart?: (hook: ReportedHookContext) => Awaitable<void>;
        onInit?: (vitest: Vitest) => void;
        onProcessTimeout?: () => Awaitable<void>;
        onServerRestart?: (reason?: string) => Awaitable<void>;
        onTestCaseAnnotate?: (
            testCase: TestCase,
            annotation: TestAnnotation,
        ) => Awaitable<void>;
        onTestCaseArtifactRecord?: (
            testCase: TestCase,
            artifact: TestArtifact,
        ) => Awaitable<void>;
        onTestCaseReady?: (testCase: TestCase) => Awaitable<void>;
        onTestCaseResult?: (testCase: TestCase) => Awaitable<void>;
        onTestModuleCollected?: (testModule: TestModule) => Awaitable<void>;
        onTestModuleEnd?: (testModule: TestModule) => Awaitable<void>;
        onTestModuleQueued?: (testModule: TestModule) => Awaitable<void>;
        onTestModuleStart?: (testModule: TestModule) => Awaitable<void>;
        onTestRemoved?: (trigger?: string) => Awaitable<void>;
        onTestRunEnd?: (
            testModules: readonly TestModule[],
            unhandledErrors: readonly SerializedError[],
            reason: TestRunEndReason,
        ) => Awaitable<void>;
        onTestRunStart?: (
            specifications: readonly TestSpecification[],
        ) => Awaitable<void>;
        onTestSuiteReady?: (testSuite: TestSuite) => Awaitable<void>;
        onTestSuiteResult?: (testSuite: TestSuite) => Awaitable<void>;
        onUserConsoleLog?: (log: UserConsoleLog) => Awaitable<void>;
        onWatcherRerun?: (files: string[], trigger?: string) => Awaitable<void>;
        onWatcherStart?: (files?: File[], errors?: unknown[]) => Awaitable<void>;
    }
    Index

    Properties

    onBrowserInit?: (project: TestProject) => Awaitable<void>

    Called when the project initiated the browser instance. project.browser will always be defined.

    onCoverage?: (coverage: unknown) => Awaitable<void>
    onHookEnd?: (hook: ReportedHookContext) => Awaitable<void>

    Called after the hook finished running.

    onHookStart?: (hook: ReportedHookContext) => Awaitable<void>

    Called before the hook starts to run.

    onInit?: (vitest: Vitest) => void
    onProcessTimeout?: () => Awaitable<void>
    onServerRestart?: (reason?: string) => Awaitable<void>
    onTestCaseAnnotate?: (
        testCase: TestCase,
        annotation: TestAnnotation,
    ) => Awaitable<void>

    Called when annotation is added via the task.annotate API.

    onTestCaseArtifactRecord?: (
        testCase: TestCase,
        artifact: TestArtifact,
    ) => Awaitable<void>

    Called when artifacts are recorded on tests via the recordArtifact utility.

    onTestCaseReady?: (testCase: TestCase) => Awaitable<void>

    Called when test case is ready to run. Called before the beforeEach hooks for the test are run.

    onTestCaseResult?: (testCase: TestCase) => Awaitable<void>

    Called after the test and its hooks are finished running. The result() cannot be pending.

    onTestModuleCollected?: (testModule: TestModule) => Awaitable<void>

    Called when the test file is loaded and the module is ready to run tests.

    onTestModuleEnd?: (testModule: TestModule) => Awaitable<void>

    Called when all tests of the test file have finished running.

    onTestModuleQueued?: (testModule: TestModule) => Awaitable<void>

    Called when the module is enqueued for testing. The file itself is not loaded yet.

    onTestModuleStart?: (testModule: TestModule) => Awaitable<void>

    Called when starting to run tests of the test file

    onTestRemoved?: (trigger?: string) => Awaitable<void>
    onTestRunEnd?: (
        testModules: readonly TestModule[],
        unhandledErrors: readonly SerializedError[],
        reason: TestRunEndReason,
    ) => Awaitable<void>

    Called when the test run is finished.

    onTestRunStart?: (
        specifications: readonly TestSpecification[],
    ) => Awaitable<void>

    Called when the new test run starts.

    onTestSuiteReady?: (testSuite: TestSuite) => Awaitable<void>

    Called when test suite is ready to run. Called before the beforeAll hooks for the test are run.

    onTestSuiteResult?: (testSuite: TestSuite) => Awaitable<void>

    Called after the test suite and its hooks are finished running. The state cannot be pending.

    onUserConsoleLog?: (log: UserConsoleLog) => Awaitable<void>
    onWatcherRerun?: (files: string[], trigger?: string) => Awaitable<void>
    onWatcherStart?: (files?: File[], errors?: unknown[]) => Awaitable<void>