Skip to content

Commit

Permalink
test: added missing test for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
alestiago committed Jun 28, 2023
1 parent 7b20383 commit 2b4ed93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/src/command_runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ void main() {
);
});

test('can be instantiated with optional parameters', () {
expect(
() => VeryGoodCommandRunner(logger: logger),
returnsNormally,
);
});

group('run', () {
test('shows update message when newer version exists', () async {
when(
Expand Down
8 changes: 8 additions & 0 deletions test/src/commands/update_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
import 'package:universal_io/io.dart';
import 'package:very_good_cli/src/command_runner.dart';
import 'package:very_good_cli/src/commands/update.dart';
import 'package:very_good_cli/src/version.dart';

import '../../helpers/helpers.dart';
Expand All @@ -17,6 +18,13 @@ void main() {
);

group('update', () {
test('can be instantiated with optional parameters', () {
expect(
() => UpdateCommand(logger: Logger()),
returnsNormally,
);
});

test(
'handles pub latest version query errors',
withRunner((commandRunner, logger, pubUpdater, printLogs) async {
Expand Down

0 comments on commit 2b4ed93

Please sign in to comment.