diff --git a/packages/integration_test/CHANGELOG.md b/packages/integration_test/CHANGELOG.md index 5ae0883ed081..71ab0e86266b 100644 --- a/packages/integration_test/CHANGELOG.md +++ b/packages/integration_test/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.2+2 + +* Fix tests from changes to `flutter test` machine output. + ## 1.0.2+1 * Update vm_service constraint diff --git a/packages/integration_test/pubspec.yaml b/packages/integration_test/pubspec.yaml index a233f066ea37..33c174a9724a 100644 --- a/packages/integration_test/pubspec.yaml +++ b/packages/integration_test/pubspec.yaml @@ -1,6 +1,6 @@ name: integration_test description: Runs tests that use the flutter_test API as integration tests. -version: 1.0.2+1 +version: 1.0.2+2 homepage: https://github.com/flutter/plugins/tree/master/packages/integration_test environment: diff --git a/packages/integration_test/test/binding_fail_test.dart b/packages/integration_test/test/binding_fail_test.dart index bb5961b18fc7..7ec176897c0c 100644 --- a/packages/integration_test/test/binding_fail_test.dart +++ b/packages/integration_test/test/binding_fail_test.dart @@ -61,13 +61,18 @@ Future> _runTest(String scriptPath) async { final String testResults = (await process.stdout .transform(utf8.decoder) .expand((String text) => text.split('\n')) - .map((String line) { + .map((String line) { try { return jsonDecode(line); } on FormatException { // Only interested in test events which are JSON. } }) + .expand>((dynamic json) { + return json is List + ? json.cast() + : >[json as Map]; + }) .where((dynamic testEvent) => testEvent != null && testEvent['type'] == 'print') .map((dynamic printEvent) => printEvent['message'] as String)