George S. Baugh 5 жил өмнө
parent
commit
e24d67a6ea
2 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 0 3
      lib/Playwright.pm
  2. 3 0
      t/Playwright.t

+ 0 - 3
lib/Playwright.pm

@@ -151,9 +151,6 @@ sub _check_node {
         my @deps = grep {my $subj=$_; grep { $_ eq $subj } @needed } @has;
         my $need_deps = scalar(@deps) != scalar(@needed);
 
-        use Data::Dumper;
-        print Dumper(\@deps);
-
         #This is really just for developers
         if ( $need_deps ) {
             confess("Production install of node dependencies must be done manually by nonroot users. Run the following:\n\n pushd '$curdir' && sudo npm i yargs express playwright uuid; popd\n\n") if $global_install;

+ 3 - 0
t/Playwright.t

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