From ffd5c07b41c3c4355557f9e78d1c4837c334cc20 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 6 Jan 2018 13:46:55 +0000 Subject: [PATCH] Revert "only use ND_PHANTOMJS env for testing" This reverts commit b49d5aeb86dc43b8c2e77e5ff9e036a23c6e1885. --- xt/11-portsort.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xt/11-portsort.t b/xt/11-portsort.t index a0330a53..fac43216 100644 --- a/xt/11-portsort.t +++ b/xt/11-portsort.t @@ -3,14 +3,16 @@ use strict; use warnings; use Test::More; +use Test::File::ShareDir::Dist { 'App-Netdisco' => 'share/' }; use Env::Path; use FindBin qw( $Bin ); -my $phantomjs = $ENV{ND_PHANTOMJS}; +my @phantomjs = Env::Path->PATH->Whence('phantomjs'); +my $phantomjs = scalar @phantomjs ? $phantomjs[0] : $ENV{ND_PHANTOMJS}; -if ( !defined $phantomjs or !-x $phantomjs ) { +if ( ! defined $phantomjs or !-x $phantomjs ) { plan skip_all => - "phantomjs not found, please set ND_PHANTOMJS to the location of the phantomjs executable"; + "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" );