what I want to achieve is to test a piece of javascript code I have to see how it behaves on different versions of Ecmascript.
Can I switch between versions in some kind of tool and test the code and see its behavior?
what I want to achieve is to test a piece of javascript code I have to see how it behaves on different versions of Ecmascript.
Can I switch between versions in some kind of tool and test the code and see its behavior?
I can't imagine anything other than EcmaScript 5 or EcmaScript 3 being relevant right now or for the next couple years. So those are the only ones you would want to test.
Well, maybe also upcoming EcmaScript 6 which slowly starts to make its way into cutting-edge browsers.
In most of the modern engines, at this point, ES3 is also replaced by ES5 almost entirely. ES3 conformance is sacrificed for ES5 conformance, which makes ES3 conformance mostly irrelevant.
For ES5, there's Google's sputniktests suite, which was (afaik) superseded by official test262.
As far as I know, there's nothing for ES6 at the moment. I maintain compatibility table, but that's just a collection of simple presence tests, not full conformance in any way.