From a5febc44e6964deff2487c1993c18dbf4a62171d Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Fri, 8 Aug 2014 21:48:38 -0400 Subject: [PATCH] unit tests for netdisco-util.js --- Netdisco/t/11-netdisco-util.t | 18 ++++++ Netdisco/t/netdisco-util.html | 100 ++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 Netdisco/t/11-netdisco-util.t create mode 100644 Netdisco/t/netdisco-util.html diff --git a/Netdisco/t/11-netdisco-util.t b/Netdisco/t/11-netdisco-util.t new file mode 100644 index 00000000..86270863 --- /dev/null +++ b/Netdisco/t/11-netdisco-util.t @@ -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" ); +} diff --git a/Netdisco/t/netdisco-util.html b/Netdisco/t/netdisco-util.html new file mode 100644 index 00000000..33ff973a --- /dev/null +++ b/Netdisco/t/netdisco-util.html @@ -0,0 +1,100 @@ + + + + + netdisco-util.js unit tests + + + + +
+
+ + + + + + +