The JS file I want to test is useless without PHP app on top of which it executes, because backend of my app generates all the DOM elements and data, which my JS app utilizes.
In other words, If I write in my.conf.js
:
files: [
'app.js',
'spec/test.js'
],
app.js
will throw tons of errors regarding not found elements, like tables, graph containers, etc.
Because of that I need to include my whole app to the test somehow. Perhaps by including my app's main index.php
? Is it possible in Karma/Jasmine? Or do I rather set some kind of redirect?