mirror of
https://github.com/flutter/packages.git
synced 2025-06-28 13:47:29 +08:00
[ci] Enable LUCI Dart unit tests (#4378)
Enables the new LUCI Dart unit tests. There is no corresponding Cirrus removal because that test was accidentally removed early in https://github.com/flutter/packages/pull/4352. Part of https://github.com/flutter/flutter/issues/114373
This commit is contained in:
@ -118,7 +118,9 @@ class DartTestCommand extends PackageLoopingCommand {
|
||||
'test',
|
||||
'--color',
|
||||
if (experiment.isNotEmpty) '--enable-experiment=$experiment',
|
||||
if (platform != null) '--platform=$platform',
|
||||
// Flutter defaults to VM mode (under a different name) and explicitly
|
||||
// setting it is deprecated, so pass nothing in that case.
|
||||
if (platform != null && platform != 'vm') '--platform=$platform',
|
||||
],
|
||||
workingDir: package.directory,
|
||||
);
|
||||
|
@ -231,6 +231,24 @@ void main() {
|
||||
]));
|
||||
});
|
||||
|
||||
test('converts --platform=vm to no argument for flutter test', () async {
|
||||
final RepositoryPackage plugin = createFakePlugin(
|
||||
'some_plugin',
|
||||
packagesDir,
|
||||
extraFiles: <String>['test/empty_test.dart'],
|
||||
);
|
||||
|
||||
await runCapturingPrint(runner, <String>['dart-test', '--platform=vm']);
|
||||
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
orderedEquals(<ProcessCall>[
|
||||
ProcessCall(getFlutterCommand(mockPlatform),
|
||||
const <String>['test', '--color'], plugin.path),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
test('runs in Chrome when requested for Flutter package', () async {
|
||||
final RepositoryPackage package = createFakePackage(
|
||||
'a_package',
|
||||
|
Reference in New Issue
Block a user