Class: JunitReporter
The JunitReporter class is responsible for generating a JUnit XML report based on the test execution results of the provided test runner. It extends the BaseReporter class.
Extends
BaseReporter
Constructors
Constructor
ts
new JunitReporter(options?: JunitReporterOptions): JunitReporter;Constructs a new instance of the reporter.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | JunitReporterOptions | Configuration options for the JUnit reporter. |
Returns
JunitReporter
A new instance of the JUnit reporter.
Overrides
ts
BaseReporter.constructor;Methods
end()
ts
end(): Promise<void>;A Japa reporter hook for the end of tests processing. Generates a JUnit XML report, and prints a summary of the test results.
Returns
Promise<void>
A promise that resolves when the operation completes.
Overrides
ts
BaseReporter.end;listConfig()
ts
static listConfig(options?: JunitReporterOptions): {
handler: (...args: [Runner, Emitter]) => void;
name: string;
};Creates a plugin definition object for registering the current class as a plugin. The plugin object includes the plugin's name and a handler method to initialize the plugin.
Parameters
| Parameter | Type |
|---|---|
options? | JunitReporterOptions |
Returns
ts
{
handler: (...args: [Runner, Emitter]) => void;
name: string;
}| Name | Type |
|---|---|
handler() | (...args: [Runner, Emitter]) => void |
name | string |
reporterConfig()
ts
static reporterConfig(options?: JunitReporterOptions): {
activated: string[];
list: {
handler: (...args: [Runner, Emitter]) => void;
name: string;
}[];
};Generates a configuration object for a reporter.
Parameters
| Parameter | Type |
|---|---|
options? | JunitReporterOptions |
Returns
ts
{
activated: string[];
list: {
handler: (...args: [Runner, Emitter]) => void;
name: string;
}[];
}| Name | Type |
|---|---|
activated | string[] |
list | { handler: (...args: [Runner, Emitter]) => void; name: string; }[] |