Skip to content

Commit

Permalink
Reset counter on test start
Browse files Browse the repository at this point in the history
  • Loading branch information
pdenert committed Nov 8, 2024
1 parent db4a2ed commit c843bfa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/patrol_log/lib/src/patrol_log_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ class PatrolLogReader {

// Print the test entry to the console.
log(entry.pretty());

// Reset the counters needed for clearing the lines.
stepsCounter = 0;
logsCounter = 0;
case TestEntry():
// Close the single test entry for the test that is finished.
_singleEntries.last.closeTest(entry);
Expand All @@ -175,10 +179,6 @@ class PatrolLogReader {
final executionTime = _singleEntries.last.executionTime.inSeconds;
// Print test entry summary to console.
log('${entry.pretty()} ${AnsiCodes.gray}(${executionTime}s)${AnsiCodes.reset}');

// Reset the counters needed for clearing the lines.
stepsCounter = 0;
logsCounter = 0;
case StepEntry():
_singleEntries.last.addEntry(entry);
if (!hideTestSteps) {
Expand Down

0 comments on commit c843bfa

Please sign in to comment.