I want a unit-test framework for JavaScript which runs in the browser. Not with an external browser-automation system as in Selenium, or a non-browser JS environment, but just one .html which loads the test framework and test suite and displays the results in that page. My searches have found only the other two kinds.
I am primarily interested in testing JavaScript code for expected results and not crashing, not DOM/events or visual appearance.
Nice-to-haves:
- Performance testing/benchmarking as well as correctness testing.
- Optional external automation so a shell command can run the test suite and check if it succeeded.
The motivation for the requirements is:
- My application under test is currently itself pure JavaScript, and I'd like to keep it that way (without platform or other-language dependencies).
- I am using many newer or bleeding-edge features such as ECMAScript 5, Typed Arrays, WebGL, and Local Storage. I want to test the actual interaction with these facilities, not stubs.