Branch Coverage

lib/Mojolicious/Plugin/JSLoader.pm
Criterion Covered Total %
branch 45 58 77.5


line true false branch
21 3 6 if ($base and substr($base, -1) ne '/')
28 4 35 unless _match_browser($c, @_)
30 7 28 if ($_[1]{'check'})
32 0 7 $_[1]{'no_base'} ? :
35 3 4 unless $asset
38 7 25 if ($_[1] and $_[1]{'inplace'})
40 0 7 $config->{'no_base'} ? :
42 0 7 if $local_base
45 0 7 $config->{'no_file'} ? :
56 0 26 if $format ne 'html'
57 11 15 unless $c->stash->{'__JSLOADERFILES__'}
62 1 24 $config->{'no_base'} ? :
64 8 17 if $local_base
66 1 4 if ($config->{'no_file'} and $config->{'on_ready'})
71 5 20 $config->{'no_file'} ? :
74 0 15 unless $c->stash->{'__JSLOADERFILES__'}
76 0 15 unless $load_js
85 15 24 unless $config
86 0 24 if ref $config ne 'HASH'
87 15 9 unless $config->{'browser'}
88 0 9 if ref $config->{'browser'} ne 'HASH'
93 0 9 unless $ua
98 2 7 if (not exists $browser->{$name} || exists $browser->{'default'}) { }
1 6 elsif (not exists $browser->{$name} and exists $browser->{'default'}) { }
107 0 6 unless defined $version
109 2 4 if (not $op or $op ne 'gt' and $op ne 'lt' and $op ne '!') { }
2 2 elsif ($op eq 'gt') { }
0 2 elsif ($op eq 'lt') { }
2 0 elsif ($op eq '!') { }