Unverified Commit 29913c90 authored by Michael Thomsen's avatar Michael Thomsen Committed by GitHub

Expose new pub outdated command (#53251)

parent 611246ae
......@@ -26,6 +26,7 @@ class PackagesCommand extends FlutterCommand {
addSubcommand(PackagesForwardCommand('version', 'Print Pub version'));
addSubcommand(PackagesForwardCommand('uploader', 'Manage uploaders for a package on pub.dev'));
addSubcommand(PackagesForwardCommand('global', 'Work with Pub global packages'));
addSubcommand(PackagesForwardCommand('outdated', 'Analyze dependencies to find which ones can be upgraded', requiresPubspec: true));
addSubcommand(PackagesPassthroughCommand());
}
......
......@@ -520,5 +520,18 @@ void main() {
BotDetector: () => const AlwaysTrueBotDetector(),
Pub: () => const Pub(),
});
testUsingContext('outdated', () async {
await createTestCommandRunner(PackagesCommand()).run(<String>['packages', 'outdated']);
final List<String> commands = mockProcessManager.commands;
expect(commands, hasLength(2));
expect(commands[0], matches(r'dart-sdk[\\/]bin[\\/]pub'));
expect(commands[1], 'outdated');
}, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Stdio: () => mockStdio,
BotDetector: () => const AlwaysTrueBotDetector(),
Pub: () => const Pub(),
});
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment