From 22fb625b955701890d0cb8126b773b7bfdceadfb Mon Sep 17 00:00:00 2001 From: Willem Leuverink Date: Fri, 19 Jan 2024 02:18:25 +0100 Subject: [PATCH] more readable console errors --- src/Components/Import.php | 2 +- tests/Browser/ComponentTest.php | 2 +- tests/Feature/IntegrationTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/Import.php b/src/Components/Import.php index aaeb863..8fc7792 100644 --- a/src/Components/Import.php +++ b/src/Components/Import.php @@ -53,7 +53,7 @@ protected function raiseConsoleErrorOrException(BundlingFailedException $e) return <<< HTML - + HTML; } diff --git a/tests/Browser/ComponentTest.php b/tests/Browser/ComponentTest.php index 9117eb2..b7e13ef 100644 --- a/tests/Browser/ComponentTest.php +++ b/tests/Browser/ComponentTest.php @@ -195,6 +195,6 @@ public function it_logs_console_errors_when_debug_mode_disabled() HTML) ->assertScript(<<< 'JS' document.querySelector('script[data-bundle="~/nonexistent-module"').innerHTML - JS, "throw 'BUNDLING ERROR: import ~/nonexistent-module as foo'"); + JS, 'throw "BUNDLING ERROR: No module found at path \'~/nonexistent-module\'"'); } } diff --git a/tests/Feature/IntegrationTest.php b/tests/Feature/IntegrationTest.php index 9df6487..49d0a41 100644 --- a/tests/Feature/IntegrationTest.php +++ b/tests/Feature/IntegrationTest.php @@ -120,7 +120,7 @@ expect($component->render()) ->toContain( 'throw', - 'BUNDLING ERROR: import ~/foo as bar' + "BUNDLING ERROR: No module found at path '~/foo'" ) ->not->toThrow(BundlingFailedException::class); });