Quick question:
It is possible to do unit testing, particularly with JStestDriver, on Javascript code written inside JSP files?
Or I have to necessarily extract it into external js files?
Quick question:
It is possible to do unit testing, particularly with JStestDriver, on Javascript code written inside JSP files?
Or I have to necessarily extract it into external js files?
The JavaScript source with the substitutions from the compiled JSP have to be extracted into separate files. Here is an example using CoffeeScript:
For JSP in particular, it is necessary to find the path to the compiled output and debug the result. Use
jspc, the JSP compiler, to test the output with JsTestDriver.References