I'm looking for JavaScript Testing Framework which I can easily use in any context, be a browser, Console, XUL,
Edit: Should do not the test framework
Is there any such structure, any other framework such as jQuery or prototype? Stay tied with JS and should not rely on a DOM (or document object) currently present. I'm looking for something to test for Pure JavaScript
OK There is something here that I was grinded on the basis of some earlier works. I hope this will satisfy your needs.
Lightweight Universal JavaScript Testing Framework
jsUnity is a light universal JavaScript test framework that is context-anecdotal Does not rely on any browser capabilities and therefore can be run in any other context using HTML, ASP, WSH or Javascript / JScript / ECMAScript.
Sample use inside HTML
"); }; Var result = jsUnity.run (sampleTestSuite); // If the result is not false, // login result. Total, results.passed, results.failed & lt; / Script & gt; & Lt; / Pre & gt;
Output of the above:
2 tests were installed [PASSED] Torn down test [Naught] testPi: What is not real value Expected: [ Expected] 3.141592653589793, [Genuine] 3.142857142857143 1 test passed 1 test failed
Comments
Post a Comment