### ----------------------------------------------------
### -- WWW::YouTube
### -- Licenses: Artistic-2.0
### -- Authors: 
### -- File: xt/01-basic-usage.rakutest
### ----------------------------------------------------
use v6.d;
use WWW::YouTube;
use Test;

plan *;

## 1
my $t1 = youtube-transcript('ewU83vHwN8Y');
isa-ok $t1, Str:D, 'got string';

## 2
#say $t1.chars;
is 36_000 < $t1.chars < 39_000, True, 'expected length';

## 3
my $t3 = youtube-transcript('ewU83vHwN8Y', format => 'dataset');
is $t3 ~~ (Array:D | List:D | Seq:D), True, 'got Array|List|Seq';

## 4
is $t3.all ~~ Map:D, True, 'array of hashmaps';

## 5
# See issue:
# https://github.com/antononcube/Raku-WWW-YouTube/issues/1
isa-ok youtube-metadata('https://youtu.be/6uCIoonlybk'), Map:D, 'working with https://youtu.be/';

done-testing;


