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 
Last time I did this I had to revert it before merging since @fat didn't like it. It's only in tests so it's not a big deal if we leave it I guess.