Skip to content

Commit

Permalink
Ignore AddJS
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Jun 7, 2024
1 parent 913ffa8 commit 0197831
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/Integrations/WooCommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ private function init( $init ) {
* Enqueue required JS in frontend.
*
* @return void
*
* @codeCoverageIgnore Because there's nothing to test here.
*/
public function add_js() {
// Causes errors in checkout and isn't needed either way.
Expand Down
15 changes: 0 additions & 15 deletions tests/integration/Integrations/WooCommerceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@
use function Brain\Monkey\Functions\when;

class WooCommerceTest extends TestCase {
/**
* @see WooCommerce::add_js()
*/
public function testAddJs() {
when( 'is_checkout' )->justReturn( false );

$class = new WooCommerce( false );

$class->add_js();

$wp_scripts = wp_scripts();

$this->assertTrue( in_array( 'plausible-woocommerce-compatibility', $wp_scripts->queue ) );
}

/**
* @see WooCommerce::track_entered_checkout()
* @return void
Expand Down

0 comments on commit 0197831

Please sign in to comment.