You can use Rhino, which is a Javascript runtime written in Java (IIRC, the command line has something like java -jar Rhino.jar script.js). This is especially useful if your tests do not require a browser.
Remember to parse your JS code with JSLint!
source share