next-wordpress-starter icon indicating copy to clipboard operation
next-wordpress-starter copied to clipboard

Add tests to harden site functionality

Open colbyfayock opened this issue 4 years ago • 2 comments

We should set up tests for the different functions that the site depend on

This includes things located in the various lib files

Jest?

colbyfayock avatar Oct 12 '20 02:10 colbyfayock

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

colbyfayock avatar Jun 09 '21 12:06 colbyfayock

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

colbyfayock avatar Oct 08 '21 16:10 colbyfayock