I would like to run my unit tests before the app builds. I’ve read a few articles but couldn’t work out the proper way to do it. Currently I’ve amended my build process from
yarn build to
yarn test && yarn build. If the test suite fails then the build will fail and if the test suite passes then the build will run.
This is the desired outcome, I was just wondering if there is a better way to do this?