Debian Codegraph @

lemonldap-ng-manager/t/91-no-console.log.t

raw
1 use Test::More;
2 use File::Find;
3
4 find(
5 sub {
6 return unless /\.js$/;
7 return if $File::Find::dir =~ m#/bwr/#;
8 return unless -f;
9 my $err;
10 if ( open my $f, '<', $_ ) {
11 grep( /console\.log/, <$f> )
12 ? fail(
13 "$File::Find::name uses console.log instead of console.<level>")
14 : pass($File::Find::name);
15
16 }
17 else {
18 fail "$File::Find::name: $!";
19 }
20 },
21 qw(site/js-src site/htdocs/static)
22 );
23
24 done_testing();