2.2.0 • Published 2 months ago

@skills17/test-result-printer v2.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
2 months ago

skills17/test-result-printer

Prints test results in a nice format to the console.

Table of contents

Installation

npm install @skills17/test-result-printer

Usage

A TestRun instance of the @skills17/test-result package can be passed to the Printer constructor.

import Printer from '@skills17/test-result-printer';

const printer = new Printer(testRun);
printer.print();

The result will be printed to the standard output.

Additionally, the print method supports an optional options parameter:

{
  // use a different printing function (defaults to console.log)
  printer?: (...data: string[]) => void;

  // if the header should be printed or not (defaults to true)
  printHeader?: boolean;

  // if the footer should be printed or not (defaults to false)
  printFooter?: boolean;

  // if points should be printed or not (defaults to true)
  printPoints?: boolean;
}

License

MIT