japa
Version:
Lean test runner for Node.js
70 lines (69 loc) • 1.63 kB
TypeScript
/**
* @module Core
*/
/// <reference types="node" />
import { EventEmitter } from 'events';
/**
* List reporter to show the tests progress on stdout in
* a list format
*/
declare class ListReporter {
private _store;
constructor(emitter: EventEmitter);
private get _indent();
/**
* When test runner has started. We just need to initiate
* the store on this event
*/
private _onStart;
/**
* Everytime a new group starts
*/
private _onGroupStart;
/**
* Everytime a group has completed running all tests
*/
private _onGroupEnd;
/**
* Print count for a label
*/
private _printCount;
/**
* Prints the error for the test. If error is an assertion error, then
* there is no need to print the stack.
*/
private _printTestError;
/**
* Everytime tests ends
*/
private _onTestEnd;
/**
* Returns a boolean if the error stack fine part of the
* japa core
*/
private _isNativeStackLine;
/**
* Returns a boolean telling if error stack is part
* of japa core by finding the sorroundings.
*/
private _isNativeSorroundedLine;
/**
* Returns the title for the failing test
*/
private _getFailingTitle;
/**
* Cleans up the error stack
*/
private _cleanupErrorStack;
/**
* Returns the error stack by filtering the japa core
* lines from it.
*/
private _formatErrorStack;
/**
* When test runner stops
*/
private _onEnd;
}
export default function listReporter(emitter: any): ListReporter;
export {};