George S. Baugh 5 жил өмнө
parent
commit
67e9bb34fa

+ 1 - 0
MANIFEST.SKIP

@@ -10,3 +10,4 @@ test2.jpg
 package-lock.json
 package-lock.json
 node_modules/*
 node_modules/*
 example.pl
 example.pl
+tidyall.ini

+ 1 - 2
lib/Playwright.pm

@@ -143,8 +143,7 @@ sub _check_node {
 
 
     {
     {
         #XXX the node Depsolver is deranged, global modules DO NOT WORK
         #XXX the node Depsolver is deranged, global modules DO NOT WORK
-        my $curdir = File::Basename::dirname($server_bin);
-        my $stack = pushd(File::Basename::dirname($server_bin));
+        my $curdir = pushd(File::Basename::dirname($server_bin));
         capture_stderr { $dep_raw = qx{$npm_bin list --json} };
         capture_stderr { $dep_raw = qx{$npm_bin list --json} };
         confess("Could not list available node modules!") unless $dep_raw;
         confess("Could not list available node modules!") unless $dep_raw;
 
 

+ 1 - 1
t/Playwright.t

@@ -86,7 +86,7 @@ subtest "_check_node" => sub {
     $fakecapture->redefine('capture_stderr', sub { 'oh no' });
     $fakecapture->redefine('capture_stderr', sub { 'oh no' });
 
 
     my $pmock = Test::MockModule->new('File::pushd');
     my $pmock = Test::MockModule->new('File::pushd');
-    $pmock->redefine('pushd', sub {});
+    $pmock->redefine('pushd', sub {shift});
 
 
     $qxret = '';
     $qxret = '';
     like( dies { Playwright::_check_node() }, qr/could not list/i, "package.json not existing throws");
     like( dies { Playwright::_check_node() }, qr/could not list/i, "package.json not existing throws");