On a new install tests do not run
devingray opened this issue · comments
I get No tests executed!
when it should atleast run the example tests
Hello, I'm not sure what you mean. Can you provide more information, like the console logs?
The preset installs Pest, but it doesn't run the tests. Your existing PHPUnit tests are not converted to Pest (you can try drift for that), but they can still be run with Pest with either php artisan test
or ./vendor/bin/pest
.
Make sure to follow the docs: your test files must end with Test.php
.
When I install it, it installs pest great..
I still have the default laravel tests ExampleTest.php
I run php artisan test
and no tests are executed.
I can do extra steps to get it working but thought you should know 💯
Can you screenshot your file hierarchy, and share your console logs and composer.json
?
With the default tests, it should definitely work.
https://github.com/laravel-presets/pest/runs/1450752985?check_suite_focus=true
Ok, let me try it again
Interesting. I never used the Laravel installer, I'll check when I can. I don't think it's related to the preset though:
- Can you run
php artisan test
without running the preset? Does it work? - If it does work, can you run
npx use-preset laravel:pest -v
and show me the logs? - What does
./vendor/bin/pest
outputs?
Just tested this out on my Windows machine. php artisan test
works before and after installing the preset. And I used both laravel new
and composer create-project laravel/laravel
to test.
Hmm, I will have to find the root cause, but since it's working for you we can close this. If I do find out what's happening I'll PR a fix incase another gets same. But possible to be my machine only
Alright. Even of it's not something you can PR I'm interested in the cause too, so feel free to comment again here if you find an explanation. :)
I found it.
Issue was that I was using the PHP version from Macos instead of the brew install
version.
brew unlink php && brew link php
💯