Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: test/backend/invoker_test.dart

Issue 2091173002: Add metadata to messages emitted by live tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/runner/runner_test.dart ('k') | test/runner/browser/loader_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/backend/invoker_test.dart
diff --git a/test/backend/invoker_test.dart b/test/backend/invoker_test.dart
index 0bc81d7568859f227ba695b084259b7dc88613bb..f31ac50a2b1d4eb150cd07fc9f529147571f5538 100644
--- a/test/backend/invoker_test.dart
+++ b/test/backend/invoker_test.dart
@@ -7,6 +7,7 @@ import 'dart:async';
import 'package:fake_async/fake_async.dart';
import 'package:test/src/backend/group.dart';
import 'package:test/src/backend/invoker.dart';
+import 'package:test/src/backend/message.dart';
import 'package:test/src/backend/metadata.dart';
import 'package:test/src/backend/state.dart';
import 'package:test/src/backend/suite.dart';
@@ -380,8 +381,12 @@ void main() {
return new Future(() => print("world!"));
}).load(suite);
- expect(liveTest.onPrint.take(2).toList(),
- completion(equals(["Hello,", "world!"])));
+ expect(liveTest.onMessage.take(2).toList().then((messages) {
+ expect(messages[0].type, equals(MessageType.print));
+ expect(messages[0].text, equals("Hello,"));
+ expect(messages[1].type, equals(MessageType.print));
+ expect(messages[1].text, equals("world!"));
+ }), completes);
return liveTest.run();
}, prints(isEmpty));
« no previous file with comments | « lib/src/runner/runner_test.dart ('k') | test/runner/browser/loader_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698