Parcourir la source

final cleanup

George S. Baugh il y a 5 ans
Parent
commit
67e9bb34fa
3 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1 0
      MANIFEST.SKIP
  2. 1 2
      lib/Playwright.pm
  3. 1 1
      t/Playwright.t

+ 1 - 0
MANIFEST.SKIP

@@ -10,3 +10,4 @@ test2.jpg
 package-lock.json
 node_modules/*
 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
-        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} };
         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' });
 
     my $pmock = Test::MockModule->new('File::pushd');
-    $pmock->redefine('pushd', sub {});
+    $pmock->redefine('pushd', sub {shift});
 
     $qxret = '';
     like( dies { Playwright::_check_node() }, qr/could not list/i, "package.json not existing throws");