I suppose end-to-end testing frameworks could help here, although not on a unit level. Cypress.io, Nightwatchjs.org… essentially anything that allows you to test by interacting from the user perspective (navigate to url so-and-so, click on button, compare result with expectation etc.)