UNPKG

@japa/spec-reporter

Version:

Spec reporter for japa test runner

46 lines (45 loc) 1.25 kB
import { BaseReporter } from '@japa/base-reporter'; import type { GroupStartNode, TestEndNode } from '@japa/core'; import type { SpecReporterOptions } from './types'; /** * Pretty prints the tests on the console */ export declare class SpecReporter extends BaseReporter { /** * Tracking the current test title and group title. We * need to adjust how we indent text and display * information */ private currentGroupTitle?; private isFirstLoneTest; constructor(options?: Partial<SpecReporterOptions>); /** * Returns the icon for the test */ private getTestIcon; /** * Returns the test message */ private getTestMessage; /** * Returns the subtext message for the test */ private getSubText; /** * Returns the filename relative from the current working dir */ private getRelativeFilename; /** * Prints the test details */ private printTest; /** * Prints the group name */ private printGroup; protected onTestStart(): void; protected onTestEnd(payload: TestEndNode): void; protected onGroupStart(payload: GroupStartNode): void; protected onGroupEnd(): void; protected end(): Promise<void>; }