unit tests for netdisco-util.js

This commit is contained in:
Eric A. Miller
2014-08-08 21:48:38 -04:00
parent b05e34f31a
commit a5febc44e6
2 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
use Env::Path;
use FindBin qw( $Bin );
my @phantomjs = Env::Path->PATH->Whence('phantomjs');
my $phantomjs = scalar @phantomjs ? $phantomjs[0] : $ENV{ND_PHANTOMJS};
if ( !-x $phantomjs ) {
plan skip_all =>
"phantomjs not found, please set ND_PHANTOMJS or install phantomjs to the default location";
}
else {
exec( $phantomjs, "$Bin/run_qunit.js", "$Bin/netdisco-util.html" );
}