-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The test262 Brackets extension supports running and creating test262 test cases. The extension contains features simplifying the testcase development process. The extension supports running tests either against javascript shells or in a browser.
The test262 test suite is the compliance test suite for JavaScript implementations to check for conformance to the EcmaScript 262 specification. The TC39 working group maintains and updates the JavaScript specification. Members of TC39 also maintain the test262 test suite project. More information on test262 can be found at http://tests262.ecmascript.org.
The test262 test suite can be run in a browser using the browser's javascript implementation. The hosted version of the test suite can run run by visiting http://test262.ecmascript.org by clicking on the Run tab and selecting any chapters.
You may also run local changes to the html version of the test suite by downloading the test suite and building locally. Using mercurial or downloaded a tarball of the code visit http://hg.ecmascript.org/tests/tests262. Once the source code is setup locally run:
$ cd ./tools/packaging $ ./packager.py ES5.1 walking dir: /Users/dschaffe/workspace/test262/test/suite/.DS_Store ... Generating test cases for ES5 chapter: bestPractice Generating test cases for ES5 chapter: ch06 ... Deploying test harness files to 'TEST262_WEB_HARNESS_DIR'... Done. $ cd ../../website python -m SimpleHTTPServer # starts a web server open http://localhost:8000/default.html # open the index page in a browser
Download a javascript shell. For example you can fairly easily download and build v8 (see http://stackoverflow.com/questions/1802478/running-v8-javascript-engine-standalone). On OSX with homebrew you can also do: brew install v8 (same as downloading https://github.com/v8/v8/archive/3.15.11.tar.gz). Then you have v8 installed into /usr/local/bin/v8.
Once you have the v8 executable you can run the javascript shell version of the test suite by running:
./tools/packaging/test262.py --command=/usr/local/bin/v8 --full-summary === Summary ===
- Ran 11746 tests
- Passed 11594 tests (98.7%)
- Failed 152 tests (1.3%)
Brackets test262 setup Running brackets-test262 in html Running brackets-test262 with shells
- test262 site: http://test262.ecmascript.org/
- ecma262 5.1 specification: http://ecma-international.org/ecma-262/5.1/
- test262 source site: http://hg.ecmascript.org/tests/test262