From d74a9e850688d0d786967dcc444b93ac182da66a Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Mon, 4 Mar 2024 10:25:39 +0100 Subject: [PATCH] test: update assertion for Laravel 10+ --- tests/Features/Commands/UpdateTsconfigCommandTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/Features/Commands/UpdateTsconfigCommandTest.php b/tests/Features/Commands/UpdateTsconfigCommandTest.php index 813a87f..4cb23b9 100644 --- a/tests/Features/Commands/UpdateTsconfigCommandTest.php +++ b/tests/Features/Commands/UpdateTsconfigCommandTest.php @@ -67,9 +67,16 @@ it('asks for confirmation before running in production', function () { sandbox(function () { + $isLaravel10OrGreater = version_compare(app()->version(), '10.0.0', '>='); + set_env('production'); this()->artisan('vite:tsconfig') - ->expectsConfirmation('Do you really wish to run this command?', 'yes') + ->expectsConfirmation( + question: $isLaravel10OrGreater + ? 'Are you sure you want to run this command?' + : 'Do you really wish to run this command?', + answer: 'yes' + ) ->assertExitCode(0); expect(File::exists(base_path('tsconfig.json')))->toBeTrue();