[flutter_tools] trim trailing newline from vm service logging events (#63976)

This commit is contained in:
Jonah Williams
2020-08-17 12:26:03 -07:00
committed by GitHub
parent c08ce78374
commit 042fa8cf66
4 changed files with 29 additions and 10 deletions

View File

@@ -402,6 +402,16 @@ void main() {
expect(vmService.httpAddress, null);
expect(vmService.wsAddress, null);
});
testWithoutContext('Can process log events from the vm service', () {
final vm_service.Event event = vm_service.Event(
bytes: base64.encode(utf8.encode('Hello There\n')),
timestamp: 0,
kind: vm_service.EventKind.kLogging,
);
expect(processVmServiceMessage(event), 'Hello There');
});
}
class MockDevice extends Mock implements Device {}