Skip to content

Commit

Permalink
chore: move log trace calls
Browse files Browse the repository at this point in the history
  • Loading branch information
peternhale committed May 16, 2024
1 parent 6643842 commit 813c07f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/reporters/tapFormatTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ export class TapFormatTransformer extends Readable {
}

_read(): void {
this.logger.trace('starting format');
this.format();
this.push(null); // Signal the end of the stream
this.logger.trace('finishing format');
}

@elapsedTime()
public format(): void {
this.logger.trace('starting format');
const testPointCount = this.testResult.tests.length;

this.push(`1..${testPointCount}\n`);
Expand All @@ -52,7 +53,6 @@ export class TapFormatTransformer extends Readable {
this.epilogue?.forEach((c) => {
this.push(`# ${c}\n`);
});
this.logger.trace('finishing format');
}

@elapsedTime()
Expand Down
4 changes: 2 additions & 2 deletions src/streaming/testResultStringifyStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ export class TestResultStringifyStream extends Readable {
}

_read(): void {
this.logger.trace('starting format');
this.format();
this.push(null); // Signal the end of the stream
this.logger.trace('finishing format');
}

@elapsedTime()
public format(): void {
this.logger.trace('starting format');
const { summary } = this.testResult;
// strip out vars not included in the summary data reported to the user

Expand All @@ -43,7 +44,6 @@ export class TestResultStringifyStream extends Readable {

// closing outer curly
this.push(`}`);
this.logger.trace('finishing format');
}

@elapsedTime()
Expand Down

0 comments on commit 813c07f

Please sign in to comment.