Add tests, get to pass

This commit is contained in:
Nic Ford 2020-09-23 07:38:05 +01:00
parent 46ade801bb
commit ee768b5d47
3 changed files with 11 additions and 1 deletions

View File

@ -16,6 +16,8 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
effective_dart: ^1.2.4
console: ^3.1.0
test: ^1.12.0

View File

@ -36,5 +36,13 @@ void main() {
var nextPage = await query.nextPage();
expect(nextPage, isNull);
});
test('SearchVideosHaveThumbnails', () async {
var searchQuery = await yt.search.queryFromPage('hello');
expect(searchQuery.content.first is SearchVideo, isTrue);
var video = searchQuery.content.first as SearchVideo;
expect(video.videoThumbnails, isNotEmpty);
});
});
}

View File

@ -20,7 +20,7 @@ void main() {
'MeJVWBSsPAY',
'5VGm0dczmHc',
'ZGdLIwrGHG8',
'rsAAeyAr-9Y',
// 'rsAAeyAr-9Y', video missing
'AI7ULzgf8RU'
};
for (var videoId in data) {