We have unit testing in place in our themes (phpunit). I can share the bootstrap code if you’re interested in?