Major unit tests cleanup

This is a pretty big PR attempting to clean up our unit tests. I reworked a few, but mostly performed style/consistency updates.

I created separate commits for the cleanup of each file, I don't know but that may help during the review. Will ofc squash if it is decided that this should be merged.

~~Also, I'll need to spend some time on the scrollspy tests, my shallow inspection concluded that they might not work as intended.~~ The scrollspy test will work once #13500 is merged.

/cc @fat @cvrebert @XhmikosR 
my vote is `<li id="home"></li>` or `<li id="home">`… we've dropped the `/` in `<img>` etc, dont see why we would randomly add them to `li`s