Skip to content

Commit

Permalink
chore: fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvroroy committed Feb 11, 2024
1 parent 502598f commit 78b1011
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/Unit/CommandRouteGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,13 @@ public function can_generate_dts_file_without_routes()
Artisan::call('ziggy:generate', ['--types-only' => true]);

$this->assertFileExists(base_path('resources/js/ziggy.d.ts'));
$this->assertFileDoesNotExist(base_path('resources/js/ziggy.js'));


if (method_exists($this, 'assertFileDoesNotExist')) {
$this->assertFileDoesNotExist(base_path('resources/js/ziggy.js'));
} else {
$this->assertFileNotExists(base_path('resources/js/ziggy.js'));
}
}

/** @test */
Expand All @@ -211,7 +217,12 @@ public function can_derive_dts_file_path_from_given_path()
Artisan::call('ziggy:generate', ['--types-only' => true]);

$this->assertFileExists(base_path('resources/js/custom.d.ts'));
$this->assertFileDoesNotExist(base_path('resources/js/ziggy.d.ts'));

if (method_exists($this, 'assertFileDoesNotExist')) {
$this->assertFileDoesNotExist(base_path('resources/js/ziggy.d.ts'));
} else {
$this->assertFileNotExists(base_path('resources/js/ziggy.d.ts'));
}
}

/** @test */
Expand Down

0 comments on commit 78b1011

Please sign in to comment.