Where to place JavaScript unit test files in a web application

506 Views Asked by At

I am working on one component (which is a web application - struts - that is deployed as a WAR), and I developed some new Javascript for which I wrote some QUnit testing. I do not know where I need to place the files that go with my QUnit (qunit.js, qunit.ccs, myTestClass.js, and the hmtl page), so that they are not packaged and deployed in the production artifact.

For example, all the java unit test goes into a test folder. But the html/jsp/js files need to be somewhere in the webapp folder.

Thanks!

1

There are 1 best solutions below

0
On

I ran into the same problem, I placed them on directory outside of the webapp and created a .html that calls loads the actual js library using a relative path. I don't think people have a standard location for this question as of yet.

I am using IntelliJ Idea so its easy to define a folder outside of the webapp that does not go in the final war.

Hope this helps.