Update browser-tests JS style

I went through the browser tests and tried to bring it closer to our style guide.

@ColinEberhardt Tests seem to run fine, but could you check that I didn't accidentally broke anything?