Skip to content

Commit

Permalink
fix static progress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Jul 2, 2024
1 parent 7d5f627 commit c5adf9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mason_logger/test/src/progress_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ void main() {
stdout = _MockStdout();
when(() => stdout.supportsAnsiEscapes).thenReturn(true);
when(() => stdout.hasTerminal).thenReturn(true);
when(() => stdout.terminalColumns).thenReturn(80);
});

test('writes ms when elapsed time is less than 0.1s', () async {
Expand Down Expand Up @@ -45,7 +46,7 @@ void main() {
() => stdout.write('${lightGreen.wrap('⠋')} $message...'),
() {
stdout.write(
'''\u001b[2K\r${lightGreen.wrap('✓')} $message ${darkGray.wrap('(0.4s)')}\n''',
'''\r${lightGreen.wrap('✓')} $message ${darkGray.wrap('(0.4s)')}\n''',
);
},
]);
Expand All @@ -72,7 +73,7 @@ void main() {
() => stdout.write('${lightGreen.wrap('⠋')} $message!!!'),
() {
stdout.write(
'''\u001b[2K\r${lightGreen.wrap('✓')} $message ${darkGray.wrap('(0.4s)')}\n''',
'''\r${lightGreen.wrap('✓')} $message ${darkGray.wrap('(0.4s)')}\n''',
);
},
]);
Expand Down

0 comments on commit c5adf9e

Please sign in to comment.