From a58f5db0cf26c050b7fbbb4294e8e8cc2ceb36d8 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Tue, 12 Aug 2014 23:06:13 -0400 Subject: [PATCH] Unit tests for netdisco-util.js --- Netdisco/t/11-netdisco-util.t | 18 +++++ Netdisco/t/html/netdisco-util.html | 108 +++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 Netdisco/t/11-netdisco-util.t create mode 100644 Netdisco/t/html/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..76a79b6a --- /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/js/run_qunit.js", "$Bin/html/netdisco-util.html" ); +} diff --git a/Netdisco/t/html/netdisco-util.html b/Netdisco/t/html/netdisco-util.html new file mode 100644 index 00000000..19a73264 --- /dev/null +++ b/Netdisco/t/html/netdisco-util.html @@ -0,0 +1,108 @@ + + + + + netdisco-util.js unit tests + + + + +
+
+ + + + + + +