Index: test/utils.dart |
diff --git a/test/utils.dart b/test/utils.dart |
index f9b4075d70df066393024421491889b9a0561c3b..64a3da7101a1c4781ad48037ee6d04dfd605ede5 100644 |
--- a/test/utils.dart |
+++ b/test/utils.dart |
@@ -8,6 +8,7 @@ import 'dart:async'; |
import 'dart:collection'; |
import 'package:unittest/src/live_test.dart'; |
+import 'package:unittest/src/load_exception.dart'; |
import 'package:unittest/src/remote_exception.dart'; |
import 'package:unittest/src/state.dart'; |
import 'package:unittest/unittest.dart'; |
@@ -71,6 +72,11 @@ Matcher isRemoteException(String message) => predicate( |
(error) => error is RemoteException && error.message == message, |
'is a RemoteException with message "$message"'); |
+/// Returns a matcher that matches a [LoadException] with the given [message]. |
+Matcher isLoadException(String message) => predicate( |
+ (error) => error is LoadException && error.innerError == message, |
+ 'is a LoadException with message "$message"'); |
+ |
/// Returns a [Future] that completes after pumping the event queue [times] |
/// times. |
/// |