diff --git a/lib/src/mcp/mcp_server.dart b/lib/src/mcp/mcp_server.dart index 7b80a8125..d6d97fc4e 100644 --- a/lib/src/mcp/mcp_server.dart +++ b/lib/src/mcp/mcp_server.dart @@ -251,6 +251,13 @@ Only one value can be selected. '(e.g. // coverage:ignore-line). ' 'Only applies to Dart tests (dart: true).', ), + 'show_uncovered': BooleanSchema( + description: + 'Whether to list uncovered lines when coverage is below ' + '100%. Implicitly enables coverage collection when used ' + 'alone. Useful for identifying which lines still need ' + 'tests after a min_coverage failure.', + ), 'timeout_seconds': IntegerSchema( description: 'Maximum seconds to wait for the test run before killing ' @@ -441,6 +448,9 @@ Only one value can be selected. if (args['check_ignore'] == true) { cliArgs.add('--check-ignore'); } + if (args['show_uncovered'] == true) { + cliArgs.add('--show-uncovered'); + } if (args['timeout_seconds'] != null) { cliArgs.addAll([ '--timeout', diff --git a/test/src/mcp/mcp_server_test.dart b/test/src/mcp/mcp_server_test.dart index 6c36ce9a3..986c1c05f 100644 --- a/test/src/mcp/mcp_server_test.dart +++ b/test/src/mcp/mcp_server_test.dart @@ -388,6 +388,7 @@ void main() { 'platform': 'chrome', 'run_skipped': true, 'check_ignore': true, + 'show_uncovered': true, 'timeout_seconds': 60, }, ), @@ -426,6 +427,7 @@ void main() { 'chrome', '--run-skipped', '--check-ignore', + '--show-uncovered', '--timeout', '60', ]),