Fix tests expectations regarding new lines. (#153174)

Fixes https://github.com/flutter/flutter/issues/153163

Dart sdk change that affected tests is
e8c035308b
This commit is contained in:
Alexander Aprelev 2024-08-09 10:31:48 -07:00 committed by GitHub
parent 857addcb31
commit 22e6af6b81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -145,7 +145,8 @@ void main() {
],
);
await runner.run(<String>['analyze', '--flutter-repo']);
final Map<String, Object?> setAnalysisRootsCommand = jsonDecode(await streamController.stream.transform(utf8.decoder).elementAt(2)) as Map<String, Object?>;
final Map<String, Object?> setAnalysisRootsCommand = jsonDecode(
await streamController.stream.transform(utf8.decoder).transform(const LineSplitter()).elementAt(1)) as Map<String, Object?>;
expect(setAnalysisRootsCommand['method'], 'analysis.setAnalysisRoots');
final Map<String, Object?> params = setAnalysisRootsCommand['params']! as Map<String, Object?>;
expect(params['included'], <String?>[Cache.flutterRoot]);

View File

@ -46,7 +46,7 @@ void main() {
));
await expectLater(
output.stream.transform(utf8.decoder),
output.stream.transform(utf8.decoder).transform(const LineSplitter()),
emits('Hello, World'),
);
});