简体   繁体   中英

Where to place JavaScript unit test files in a web application

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM