Without a browser, ant -task-oriented testing of the Javascript Unit?

I am looking for a javascript unit test framework that I can use as part of my maven auto build. This CANNOT use the actual browser, and it MUST be completely without a browser.

I tried looking at a few posts on SO, but no one seems to meet my needs. Is there such a javascript tester? I really want to know.

+4
source share
5 answers

I tried to solve the same problem. It does not seem to be as common as you might think from our point of view.

RhinoUnit looks very good.

If you need browser capabilities in Rhino, take a look at

+4
source

There are two projects called JSUnit ( www.jsunit.net ) and ( jsunit.berlios.de ). The latter is designed to work with Rhino and Maven . Please note that there will be problems with the browser that such tests will not detect, but they should help with the basic functions.

+3
source

Not sure about the structure of testing JavaScript modules, although I'm sure there is one. But I will probably look at Rhino as a JS translator.

http://www.mozilla.org/rhino/

If your JS links to any of the browsers / DOM, you will also need to mock them ...

+1
source

Have you tried JSunit?

0
source

AFAIK, javascript is a language specifically designed to work in a browser.

Have you considered j-unit tests? However, they still work in the browser.

-2
source

All Articles