diff --git a/test/search_test.dart b/test/search_test.dart index 2279bd5..e1989cd 100644 --- a/test/search_test.dart +++ b/test/search_test.dart @@ -30,23 +30,26 @@ void main() { expect(nextPage, isNull); }); + test('Search only videos', () async { + var videos = + await yt!.search.searchContent('Banana', filter: TypeFilters.video); + expect(videos, everyElement(isA())); + }); + test('Search only channels', () async { var channels = await yt!.search .searchContent('PewDiePie', filter: TypeFilters.channel); - expect(channels.every((e) => e is SearchChannel), isTrue); + expect(channels, everyElement(isA())); + }); test('Search only playlists', () async { - var channels = + var playlists = await yt!.search.searchContent('Banana', filter: TypeFilters.playlist); - expect(channels.every((e) => e is SearchPlaylist), isTrue); + expect(playlists, everyElement(isA())); }); - test('Search only movies', () async { - var channels = - await yt!.search.searchContent('Banana', filter: TypeFilters.playlist); - expect(channels.every((e) => e is SearchPlaylist), isTrue); - }); + test('Search test search filters', () async { var featureSearch =