ES-Feature-Tests
ES-Feature-Tests copied to clipboard
ES5 Testing
Would you be open to having ES5 features tested too? Ones that can't be polyfilled that is, like Object.defineProperty.
I am open to it, but we'd want to test all of ES5's features and not just some. I wasn't sure if people would really find value in such things or not.
I'm looking to do was you suggest (write in ES6 and compile down) but go down to ES3 if needed.
Babel/Traceur go to ES5, and then es5-shim can patch a pre-ES5 environment to be up to ES5 standards.
So the only thing that doesn't cover is if you want to write ES5 syntax (like the getters/setters). That's not really transpilable though, as far as I'm aware, so I don't know how much value having such a test result would add to your scenario.
Ultimately, I'd recommend writing ES6, transpiling to ES5 (which doesn't use any of those ES5 only syntaxes), and using es5-shim to patch up pre-ES5 browsers. That should cover your like 99% use case.
I think that may just be best. I think a basic ES5 test would still be usefull, so that you know if you should load the shim or not.