Pest: standard php unit tests not run when using 'groups'

Created on 29 May 2020  路  6Comments  路  Source: pestphp/pest

I'm working on converting my tests over to Pest. (Its awesome, Thanks!), When I run vendor/bin/pest I get 50 passed tests, roughly half are in FolderA, and the other half are in FolderB

in my Pest.php I have something like

uses(ProjectATestCase::class)->group('a')->in('FolderA');
uses(ProjectBTestCase::class)->group('b')->in('FolderB');

but now when I run a group only my actual pest tests run, which means I'm missing quite a few

vendor/bin/pest --group=a # 3 passed tests
vendor/bin/pest --group=b # 18 passed tests

Not sure if this is a bug, or intended, but it definitely surprised me (although soon it will all be switched over so not a problem)

All 6 comments

Yeah - that uses function only covers pest tests. Sorry about that.

Can you add a note on the docs about this?

Note added to the docs:
https://pestphp.com/docs/groups/

@AlexMartinFR Added a comment on the commit. can you check?

Corrected my wrong statement. It should now be clearer as well 馃憤

@reed-jones , could you confirm that this would have helped you understand the problem you encountered better, please?

https://pestphp.com/docs/groups/

Totally, that makes perfect sense to me. Thanks!

Great!
Thanks for sharing your experience, and happy testing 馃槑

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nunomaduro picture nunomaduro  路  4Comments

beliolfa picture beliolfa  路  3Comments

maks-rafalko picture maks-rafalko  路  6Comments

nunomaduro picture nunomaduro  路  7Comments

nunomaduro picture nunomaduro  路  5Comments