[Bug]: --exactly flag does not return a non zero exit code when it should fail
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11.7k
- Forks
- 538
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 8
Description
What Happened
When I run my tests and provide the --exactly flag, which I have set to 100, the exit code is 0 even when the code coverage is not 100%. From what I understand this should be a non-zero exit code.
How to Reproduce
Create a fresh laravel application. The example tests are enough to see the issue. Run php artisan test --coverage --exactly=100. Then check the exit code echo $?.
Sample Repository
No response
Pest Version
5.1.3
PHP Version
8.4
Operation System
macOS
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in a fresh Laravel application with php artisan test --coverage --exactly=100, then inspect how the --exactly coverage option determines the command exit status. Done means the command returns a non-zero exit code when coverage is below 100%, while preserving the expected behavior when it reaches 100%.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100