Skip to content

Commit 697ca5f

Browse files
committed
Testing build actions
1 parent 4aeff1f commit 697ca5f

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

tests/Feature/Command/TailwindCssCommandTest.php

+1-23
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Fuelviews\Tailwindcss\Tests\TestCase;
66
use Illuminate\Support\Facades\File;
7+
use Illuminate\Support\Facades\Storage;
78

89
class TailwindCssCommandTest extends TestCase
910
{
@@ -17,14 +18,6 @@ public function it_installs_tailwindcss_command(): void
1718
}
1819
}
1920

20-
$packageJsonPath = 'package.json';
21-
if (File::exists(base_path($packageJsonPath))) {
22-
File::put(base_path($packageJsonPath), '
23-
{
24-
"devDependencies": {}
25-
}');
26-
}
27-
2821
$this->artisan('tailwindcss:install')
2922
->expectsConfirmation('tailwind.config.js does not exist. Would you like to install it now?', 'yes')
3023
->expectsConfirmation('postcss.config.js does not exist. Would you like to install it now?', 'yes')
@@ -35,21 +28,6 @@ public function it_installs_tailwindcss_command(): void
3528
/** @test */
3629
public function it_asks_to_overwrite_tailwindcss_command(): void
3730
{
38-
$packageJsonPath = 'package.json';
39-
if (File::exists(base_path($packageJsonPath))) {
40-
File::put(base_path($packageJsonPath), '
41-
{
42-
"devDependencies": {
43-
"@tailwindcss/forms": "^0.5.7",
44-
"@tailwindcss/typography": "^0.5.10",
45-
"autoprefixer": "^10.4.18",
46-
"dotenv": "^16.4.5",
47-
"postcss": "^8.4.37",
48-
"tailwindcss": "^3.4.1"
49-
}
50-
}');
51-
}
52-
5331
$this->artisan('tailwindcss:install')
5432
->expectsConfirmation('tailwind.config.js already exists. Do you want to overwrite it?', 'no')
5533
->expectsConfirmation('postcss.config.js already exists. Do you want to overwrite it?', 'no')

tests/TestCase.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Fuelviews\Tailwindcss\Tests;
44

55
use Fuelviews\Tailwindcss\TailwindCssServiceProvider;
6+
use Illuminate\Support\Facades\File;
67
use Illuminate\Support\Facades\Storage;
78
use Orchestra\Testbench\TestCase as Orchestra;
89

@@ -11,8 +12,6 @@ class TestCase extends Orchestra
1112
protected function setUp(): void
1213
{
1314
parent::setUp();
14-
15-
Storage::fake('local');
1615
}
1716

1817
protected function getPackageProviders($app): array

0 commit comments

Comments
 (0)