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 
It didn't work with 0, obviously, so I moved to a higher number and remembered that Paul Irish's [rAF polyfill used 18](https://gist.github.com/paulirish/1579671#file-raf-js-L20) (it actually uses 16 ms now that I see it. I guess I remembered wrongly).