Skip to content

Commit

Permalink
[9.x] Update Vite mock to return empty array for preloadedAssets (#44858
Browse files Browse the repository at this point in the history
)

* fix: update Vite mock to return empty array for preloadedAssets

* chore: fix code style

* Trigger tests to re-run
  • Loading branch information
jryd authored Nov 7, 2022
1 parent e5398e7 commit 29430b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ public function useStyleTagAttributes()
{
return $this;
}

public function preloadedAssets()
{
return [];
}
});

return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ public function testWithViteRestoresOriginalHandlerAndReturnsInstance()
$this->assertSame($this, $instance);
}

public function testWithoutViteReturnsEmptyArrayForPreloadedAssets(): void
{
$instance = $this->withoutVite();

$this->assertSame([], app(Vite::class)->preloadedAssets());
$this->assertSame($this, $instance);
}

public function testWithoutMixBindsEmptyHandlerAndReturnsInstance()
{
$instance = $this->withoutMix();
Expand Down

0 comments on commit 29430b4

Please sign in to comment.