next-wordpress-starter
next-wordpress-starter copied to clipboard
Add tests to harden site functionality
We should set up tests for the different functions that the site depend on
This includes things located in the various lib files
Jest?
would love to see some cypress tests too covering basic functionality, ideally things that someone wouldn't need to remove when cloning the site to avoid someone having to clean out a bunch of tests before getting started
we could theoretically make a query to WordPress and test page / post creation this way
- Get the posts
- check hte homepage shows the first several posts based on posts per page
- etc
the tests should generally be unopinionated, meaning, they shouldn't necessarilly test implementation details, otherwise the tests will start to fail as someone starts using the project by pulling in their own content and updating their name which shouldnt be the case