Skip to content

Commit

Permalink
fix: fail-fast if reporter cannot initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed May 4, 2024
1 parent 50e9dfe commit 0027747
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/reporter/JestAllure2Reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ export class JestAllure2Reporter extends JestMetadataReporter {
options: ReporterOnStartOptions,
): Promise<void> {
await super.onRunStart(aggregatedResult, options);
const attemptInit = this.#attempt.bind(this, 'onRunStart#init()', this.#init);
const attemptRunStart = this.#attempt.bind(this, 'onRunStart()', this.#onRunStart);

await log.trace.begin(__TID(), 'jest-allure2-reporter');
await log.trace.complete(__TID(), 'init', attemptInit);
await log.trace.complete(__TID(), 'init', this.#init.bind(this));
await log.trace.complete(__TID(), 'onRunStart', attemptRunStart);
}

Expand Down

0 comments on commit 0027747

Please sign in to comment.