Unit testing recommendation

Does anyone have any recommendations regarding integrating unit tests into statically generated sites? Is that even possible in the traditional sense? What are some ways you have integrated any kind of tests into static sites?

Interesting question, and I have been using linting and minification as a form of this. This article shows an approach but I did not try it:

https://skeltonthatcher.com/blog/continuous-integration-static-dynamic-website-testing/

fyi, as a start

Let us know what you find out. I think everyone has a way of doing this, but I imagine there must be a couple of best practices, now that I’m looking into it more.

http://www.webpagemistakes.ca/website-testing/

Yeah, I’ve got things like linting covered. I don’t think that’s technically unit testing. Maybe it doesn’t really apply in the traditional sense to this type of setup. I’ll keep looking into it.

What things do you want to test? Like “x tag must have y css class” for some kind of visual guideline compliance?

Also, Selenium is complicated and comprehensive but maybe it’s possible to adapt that.

I’m not talking about functional or regressive testing. I’m talking specifically about unit tests.