10up / wp-scaffold

10up WordPress project scaffold.
MIT License
207 stars 49 forks source link

Unit tests #241

Open tobeycodes opened 1 month ago

tobeycodes commented 1 month ago

I think we should add unit testing to the scaffold rather than having to set it up on each projects. They are not always setup in the same way and I think it makes sense to be opinionated here.

Some examples of libraries we can consider using:

https://github.com/pestphp/pest https://github.com/Brain-WP/BrainMonkey

darylldoyle commented 2 weeks ago

Thanks @tobeycodes, I've added this to the Internal Tools working group agenda for discussion. I also started implementing some tests in #236 which might interest you.

tobeycodes commented 2 weeks ago

@darylldoyle #236 looks nice!

My preference here would always be unit tests rather than integration tests but I appreciate integration tests are more commonoly used for WP testing. I think they are easier to setup. write and maintain and allow you to test your code in isolation