Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/integration_test/test/binding_fail_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ Future<Map<String, dynamic>> _runTest(String scriptPath) async {
final String testResults = (await process.stdout
.transform(utf8.decoder)
.expand((String text) => text.split('\n'))
.map((String line) {
.map<dynamic>((String line) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure you need this <dynamic> here? But if no linter complains, let's gooo!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think since this is copied from the SDK repo, where type annotations are necessary

try {
return jsonDecode(line);
} on FormatException {
// Only interested in test events which are JSON.
}
})
.expand<Map<String, dynamic>>((dynamic json) {
return json is List<dynamic>
? json.cast()
: <Map<String, dynamic>>[json as Map<String, dynamic>];
})
.where((dynamic testEvent) =>
testEvent != null && testEvent['type'] == 'print')
.map((dynamic printEvent) => printEvent['message'] as String)
Expand Down