Documentation Home
This page describes a pre-release version of Jasmine (5.0.0-beta.0). There may be additional changes, including breaking changes, before the final 5.0.0 release.
The current stable version of Jasmine is 5.4.

Class: ParallelReportDispatcher

ParallelReportDispatcher(onError)

A report dispatcher packaged for convenient use from outside jasmine-core.

This is intended to help packages like jasmine (the Jasmine runner for Node.js) do their own report dispatching in order to support parallel execution. If you aren't implementing a runner package that supports parallel execution, this class probably isn't what you're looking for.

Warning: Do not use ParallelReportDispatcher in the same process that Jasmine specs run in. Doing so will break Jasmine's error handling.

Constructor

new ParallelReportDispatcher(onError)

Parameters:
Name Type Description
onError function

Function called when an unhandled exception, unhandled promise rejection, or explicit reporter failure occurs

Implements:

Methods

addReporter(reporterToAdd)

Adds a reporter to the list of reporters that events will be dispatched to.

Parameters:
Name Type Description
reporterToAdd Reporter

The reporter to be added.

See:

clearReporters()

Clears all registered reporters.

installGlobalErrors()

Installs a global error handler. After this method is called, any unhandled exceptions or unhandled promise rejections will be passed to the onError callback that was passed to the constructor.

uninstallGlobalErrors()

Uninstalls the global error handler.