Skip to content

skills17/test-result-printer

Repository files navigation

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

About

Prints test results in a nice format to the console.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages