portsort.js unit tests using qunit, qunit-tap, and phantomjs

This commit is contained in:
Eric A. Miller
2014-08-12 18:49:43 -04:00
parent 0b090e2ca6
commit 8cc9e64c9a
4 changed files with 713 additions and 0 deletions

18
Netdisco/t/11-portsort.t Executable file
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/js/run_qunit.js", "$Bin/html/portsort.html" );
}