Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.34 KB

ConfigureReportersWithOptions.md

File metadata and controls

52 lines (32 loc) · 1.34 KB

How to Configure Reporters with Options

Contents

Why Configure Reporters

If you want to view failures in different ways, such as with different diff tools.

How to Select a Reporter

At the moment, you need to take advantage of the ConfigModifier in Options.

Here is an example.

let configModifier: ConfigModifier = (c) => {
  c.reporters = [new JestReporter(), "BeyondCompare"];
  return c;
};
let options = new Options();
options = options.withConfig(configModifier);

verify("Hello", options);

snippet source | anchor

Note when passing in multiple reporters, it will use the first one that works on your system.

See Also


Back to User Guide