JavaScript unit tests in Eclipse
Anybody knows what's currently the most popular tool for javascript unit testing?
While figuring this out, I made up a simple javascript unit tests integration with Eclipse to easily run precious tests from my favourite environment :-)
Unit tests are simple objects with functions to test and there's a couple of JUnit-style assertions. I wonder if the above view could be integrated with some real JS unit test tool.
While figuring this out, I made up a simple javascript unit tests integration with Eclipse to easily run precious tests from my favourite environment :-)
Unit tests are simple objects with functions to test and there's a couple of JUnit-style assertions. I wonder if the above view could be integrated with some real JS unit test tool.
There's JsUnit (http://www.jsunit.net/), jsTest (http://thinkpond.org/articles/2008/jstest-intro.shtml) and JsTestDriver (http://misko.hevery.com/2009/12/04/there-are-lots-of-ways-to-tests-your-javascript-but-there-is-only-one-jstestdriver/)
ReplyDeleteNice one Jacek!
ReplyDeleteDoes this plugin run with ATF's or/and WTP's implementations? I think of a nice product to host this plugin ;)
For pure JavaScript and Eclipse integration there's one I use in the e4 repo -- org.eclipse.e4.languages.javascript.junit.
ReplyDeleteIt really is just providing a specialized TestCase and using Rhino and JUnit under the covers and does not handle one clicking on a unit test to take you to source. With that said its very fast and works well enough for me and I've used it for 100s of tests.
Small off topic: is that Mac? :)
ReplyDelete