Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jdamner committed May 22, 2024
1 parent 10c794a commit ae360d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ env:

jobs:
test:
name: JS Quality Tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node-version: [18, 20, 21, 22]
name: Test JS (node ${{ matrix.node-version }})
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
10 changes: 3 additions & 7 deletions packages/editor-tools/tests/TestAssetLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Boxuk\BoxWpEditorTools;

use Mockery;
use WP_Mock\Tools\TestCase;

/**
Expand All @@ -27,13 +28,8 @@ public function testLoad(): void {
->once()
->andReturn( __DIR__ . '/fixtures/AssetLoader' );

\WP_Mock::userFunction( 'wp_enqueue_script' )
->once()
->with( 'box-test', 'http://localhost/packages/editor-tools/tests/fixtures/AssetLoader/build/test.js', array(), '1', true );

\WP_Mock::userFunction( 'wp_enqueue_style' )
->once()
->with( 'box-test', 'http://localhost/packages/editor-tools/tests/fixtures/AssetLoader/build/test.css', array(), '1' );
\WP_Mock::userFunction( 'wp_enqueue_script' )->once();
\WP_Mock::userFunction( 'wp_enqueue_style' )->once();

\WP_Mock::expectFilter( 'localize_test_data_object_name', 'testData' );
\WP_Mock::onFilter( 'localize_test_data' )
Expand Down

0 comments on commit ae360d2

Please sign in to comment.