@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
28 lines • 1.14 kB
TypeScript
import type { Options } from 'chalk';
import type { DiffFormatter } from './DiffFormatter';
/**
* A [`DiffFormatter`](https://serenity-js.org/api/core/interface/DiffFormatter/) that uses [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
* to format the output.
*
* @group Errors
*/
export declare class AnsiDiffFormatter implements DiffFormatter {
private readonly chalk;
/**
* Instantiates an `AnsiDiffFormatter`, configured with colour support options for [Chalk](https://github.com/chalk/chalk).
* When no `chalkOptions` object is provided, Chalk will auto-detect colour support automatically based on the execution environment.
*
* Available colour support levels:
* - `0` - All colours disabled.
* - `1` - Basic 16 colours support.
* - `2` - ANSI 256 colours support.
* - `3` - Truecolor - 16 million colours support.
*
* @param chalkOptions
*/
constructor(chalkOptions?: Options);
expected(line: string): string;
received(line: string): string;
unchanged(line: string): string;
}
//# sourceMappingURL=AnsiDiffFormatter.d.ts.map