2

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?

pencilCake
  • 51,323
  • 85
  • 226
  • 363
  • yeah its called open different browsers. – Raynos Feb 07 '13 at 08:58
  • So you suggest to test in 5 different editions of EcmaScript I have to install 5 different browsers? (At least...) – pencilCake Feb 07 '13 at 08:59
  • I wouldn't test multiple versions of EcmaScript. I only test es5 and older browsers that implement a subset of es5 – Raynos Feb 07 '13 at 09:05
  • For ES4 specifically, you can download the ES4 reference implementation. It doesn't contain DOM environment and isn't really JavaScript, not complete on E4X and misses very-very few features. https://web.archive.org/web/20080512025457/http://www.ecmascript.org/download.php Select one to download, scroll down and inspect elements at the **Continue** button, and you'll see download URL on the `form` element. There's also the Tamarin Compiler (never used), still open-source (on GitHub): tamarin-central. Then just run `run.cmd` or `run.sh`. –  Oct 21 '17 at 10:50

1 Answers1

2

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.

kangax
  • 38,898
  • 13
  • 99
  • 135