Index: tests/html/element_test.dart |
diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart |
index 63b586733ea54fb9a502fa5d6c716e9d9b4d95d0..d9916ba24ca0335e1ca9167a78eb13078df62737 100644 |
--- a/tests/html/element_test.dart |
+++ b/tests/html/element_test.dart |
@@ -368,9 +368,9 @@ main() { |
expect(els[2], isInputElement); |
}); |
- test('filter', () { |
+ test('where', () { |
var filtered = makeElementWithChildren().children. |
- filter((n) => n is ImageElement); |
+ where((n) => n is ImageElement); |
expect(1, filtered.length); |
expect(filtered[0], isImageElement); |
expect(filtered, isElementList); |
@@ -382,10 +382,10 @@ main() { |
expect(el.children.every((n) => n is InputElement), isFalse); |
}); |
- test('some', () { |
+ test('any', () { |
var el = makeElementWithChildren(); |
- expect(el.children.some((n) => n is InputElement), isTrue); |
- expect(el.children.some((n) => n is svg.SvgElement), isFalse); |
+ expect(el.children.any((n) => n is InputElement), isTrue); |
+ expect(el.children.any((n) => n is svg.SvgElement), isFalse); |
}); |
test('isEmpty', () { |
@@ -506,13 +506,13 @@ main() { |
expect(els[2], isHRElement); |
}); |
- test('map', () { |
- var texts = getQueryAll().map((el) => el.text); |
+ test('mappedBy', () { |
+ var texts = getQueryAll().mappedBy((el) => el.text).toList(); |
expect(texts, equals(['Dart!', 'Hello', ''])); |
}); |
- test('filter', () { |
- var filtered = getQueryAll().filter((n) => n is SpanElement); |
+ test('where', () { |
+ var filtered = getQueryAll().where((n) => n is SpanElement).toList(); |
expect(filtered.length, 1); |
expect(filtered[0], isSpanElement); |
expect(filtered, isElementList); |
@@ -524,10 +524,10 @@ main() { |
expect(el.every((n) => n is SpanElement), isFalse); |
}); |
- test('some', () { |
+ test('any', () { |
var el = getQueryAll(); |
- expect(el.some((n) => n is SpanElement), isTrue); |
- expect(el.some((n) => n is svg.SvgElement), isFalse); |
+ expect(el.any((n) => n is SpanElement), isTrue); |
+ expect(el.any((n) => n is svg.SvgElement), isFalse); |
}); |
test('isEmpty', () { |
@@ -590,8 +590,8 @@ main() { |
group('_ElementList', () { |
List<Element> makeElList() => makeElementWithChildren().children; |
- test('filter', () { |
- var filtered = makeElList().filter((n) => n is ImageElement); |
+ test('where', () { |
+ var filtered = makeElList().where((n) => n is ImageElement); |
expect(filtered.length, 1); |
expect(filtered[0], isImageElement); |
expect(filtered, isElementList); |