Fix device daemon test when desktop or web are enabled (#45172)

This commit is contained in:
Danny Tuppeny
2019-11-20 11:02:35 +00:00
committed by GitHub
parent fb5e49082b
commit 73c32545b7

View File

@@ -60,7 +60,8 @@ void main() {
'id': 2,
'method': 'device.getDevices',
})}]');
response = await stream.first;
// Skip other device.added events that may fire (desktop/web devices).
response = await stream.firstWhere((Map<String, dynamic> response) => response['event'] != 'device.added');
expect(response['id'], 2);
expect(response['error'], isNull);