There's multiple answers to this.
Number one: web developers have been able to get along with different browsers for a while now. Shims, hacks, polyfills, transpiling, not using cutting edge features, phew.
Number two: the tests you are describing have already been done by kangax/ES6 and caniuse as well as other online services. Their test coverage can only be constructed with a pretty big testing setup.
Number three: if you must offer different versions of your website or set a minimum target, then check out the headers browsers send. I think user agent contains the versions (confusingly at first) of all the browsers that the user implements. Here's an example of what my browser sent to this website:
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
(User-Agent is the name of the header, the rest is the content) So you could assert that if it's below Chrome 41, you serve a simpler version.
Either way, there's a lot in this topic to explore. I'd say that JavaScript is
the fairly good part of it, while HTML5 is the much more worrisome one.