Branch Coverage

lib/Mojolicious/Plugin/JSLoader.pm
Criterion Covered Total %
branch 62 62 100.0


line true false branch
21 3 11 if ($base and substr($base, -1) ne '/')
28 4 57 unless _match_browser($c, @_)
30 9 48 if ($_[1]{'check'})
32 1 8 $_[1]{'no_base'} ? :
35 3 6 unless $asset
38 10 44 if ($_[1]{'inplace'})
40 1 9 $config->{'no_base'} ? :
42 2 8 if $local_base
44 1 9 if $config->{'js'}
47 1 9 $config->{'no_file'} ? :
60 1 35 if $format ne 'html'
61 11 24 unless $c->stash->{'__JSLOADERFILES__'}
62 1 23 if 'ARRAY' ne ref $c->stash->{'__JSLOADERFILES__'}
71 1 41 $config->{'no_base'} ? :
73 4 38 if $config->{'js'}
75 16 26 if $local_base
77 3 12 if ($config->{'no_file'} and $config->{'on_ready'})
82 15 27 $config->{'no_file'} ? :
85 41 1 $file ? :
89 2 21 unless $load_js
98 24 51 unless $config
99 3 48 if ref $config ne 'HASH'
100 30 18 unless $config->{'browser'}
101 1 17 if ref $config->{'browser'} ne 'HASH'
108 5 12 unless (exists $browser->{$name})
109 2 3 exists $browser->{'default'} ? :
114 1 11 unless defined $version
116 3 8 unless defined $op
118 3 8 if ($op eq 'gt') { }
1 7 elsif ($op eq 'lt') { }
4 3 elsif ($op eq '!') { }