File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,9 @@ void main() {
177177 List <({String file, String breakpointMarker, Breakpoint ? bp})>
178178 breakpoints,
179179 ) async {
180- final waitForPausePost = stream.firstWhere (
181- (event) => event.kind == EventKind .kPausePostRequest,
180+ final waitForPausePost = expectLater (
181+ stream,
182+ emitsThrough (_hasKind (EventKind .kPausePostRequest)),
182183 );
183184
184185 // Initiate the hot reload by loading the sources into the page.
@@ -235,8 +236,8 @@ void main() {
235236 });
236237 }
237238
238- Future <Event > waitForBreakpoint () =>
239- stream. firstWhere ((event) => event.kind == EventKind .kPauseBreakpoint);
239+ Future <dynamic > waitForBreakpoint () =>
240+ expectLater ( stream, emitsThrough ( _hasKind ( EventKind .kPauseBreakpoint)) );
240241
241242 test ('after edit and hot reload, breakpoint is in new file' , () async {
242243 final oldString = 'main gen0' ;
@@ -501,3 +502,6 @@ void main() {
501502 });
502503 }, timeout: Timeout .factor (2 ));
503504}
505+
506+ TypeMatcher <Event > _hasKind (String kind) =>
507+ isA <Event >().having ((e) => e.kind, 'kind' , kind);
You can’t perform that action at this time.
0 commit comments