Skip to content

Commit

Permalink
Fix missing Mix manifest solution
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Jun 15, 2022
1 parent 5e3a608 commit 667aa36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MissingMixManifestSolutionProvider implements HasSolutionsForThrowable
{
public function canSolve(Throwable $throwable): bool
{
return Str::startsWith($throwable->getMessage(), 'The Mix manifest does not exist');
return Str::startsWith($throwable->getMessage(), 'Mix manifest not found');
}

public function getSolutions(Throwable $throwable): array
Expand Down
4 changes: 2 additions & 2 deletions tests/Solutions/MixManifestNotFoundSolutionProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

it('can solve a missing mix manifest exception', function () {
$canSolve = app(MissingMixManifestSolutionProvider::class)
->canSolve(new Exception('The Mix manifest does not exist.'));
->canSolve(new Exception('Mix manifest not found.'));

expect($canSolve)->toBeTrue();
});

it('can recommend running npm install and npm run dev', function () {
/** @var \Spatie\Ignition\Contracts\Solution $solution */
$solution = app(MissingMixManifestSolutionProvider::class)
->getSolutions(new Exception('The Mix manifest does not exist.'))[0];
->getSolutions(new Exception('Mix manifest not found.'))[0];

expect(Str::contains($solution->getSolutionDescription(), 'Did you forget to run `npm ci && npm run dev`?'))->toBeTrue();
});

0 comments on commit 667aa36

Please sign in to comment.