Skip to content

Commit cd9a206

Browse files
nshahancommit-bot@chromium.org
authored andcommitted
[tests] Fix type of stream getter in test
The focus event stream is typed to be non-nullable. Updated the return of the function passed to reduce in the "_2" version as well to keep them consistent. Change-Id: Ic1ae2e027c184d751549c989d60924360139fd5c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154140 Reviewed-by: Srujan Gaddam <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]>
1 parent 6547f74 commit cd9a206

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/lib/html/streams_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class StreamHelper {
1515
}
1616

1717
Element get element => _a;
18-
Stream<Event?> get stream => _a.onFocus;
18+
Stream<Event> get stream => _a.onFocus;
1919

2020
// Causes an event on a to be fired.
2121
void pulse() {
@@ -193,7 +193,7 @@ main() {
193193
});
194194

195195
test('reduce', () {
196-
stream.reduce((a, b) => null).then((_) {});
196+
stream.reduce((a, b) => a).then((_) {});
197197
});
198198

199199
test('fold', () {

tests/lib_2/html/streams_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ main() {
189189
});
190190

191191
test('reduce', () {
192-
stream.reduce((a, b) => null).then((_) {});
192+
stream.reduce((a, b) => a).then((_) {});
193193
});
194194

195195
test('fold', () {

0 commit comments

Comments
 (0)