I am trying to add Qunit tests for our MVVM based UI application. I planned to have separate tests.html which will have Qunit test fixtures and acts as test report page. So I am focusing on testing the view models (JS files) of the application. But I have some parts of js files expecting the actual UI components to be present, especially jquery selector calls such as $('#xyz'). How can I test this code, can you please guide me.
The reason I didn't put qunit DIV in main application index.html is, I need to remove these div's automatically as part of build process to prepare release candidate build. Is it common practice to remove these div's automatically as part of build or I can keep another file with same contents as in my index.html and still have test div's which I will not bundle in my production package. Which one is more acceptable practice.