portsort.js unit tests using qunit, qunit-tap, and phantomjs
This commit is contained in:
19
Netdisco/t/11-sort_port.t
Executable file
19
Netdisco/t/11-sort_port.t
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/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, 'run_qunit.js', 'sort-port.html');
|
||||
}
|
||||
Reference in New Issue
Block a user