Support for Pest tests #194
Replies: 1 comment 1 reply
-
As you mentioned, everything is designed around classes as I never thought something like Pest would exist 3-4 years ago. 😅 I think adding support for Pest would definitely be great. It's getting more and more traction and I think it's a great project. (I haven't used it myself in a project, but plan to do so very soon) I would glady accept a well thought out PR. But as you mentioned, you would have to change quite a lot here. (I would even say that it's basically a rewrite of the core of the package.) In #153 I hinted, that I think it would be great if we could expand If you have any ideas on how to tackle these problems, feel free to submit a PR or let's discuss it here. |
Beta Was this translation helpful? Give feedback.
-
Currently the whole evaluation is designed around classes which are loaded by
laravel-stats/src/ClassesFinder.php
Lines 18 to 33 in 13474ea
it
andtest
instead of using classes like PHPUnit which means the code to test ratio will be wrong because it doesn't detect the Pest tests.Supporting this would probably require quite a bit of change because we would need to handle classes and some kind of pattern matching inside of files to see if we are dealing with a pest file if we are encountering a file that ends with
Test.php
.Would this be a change for which a PR would be accepted or would this be too big a of change and not worth the effort just to support Pest? I've already tried to detect pest tests with the current system but couldn't make it work because everything is designed around classes.
Beta Was this translation helpful? Give feedback.
All reactions