I have a legacy web application that have bunch of javascript files. Those files need to be loaded in order and some of them may have duplicate global functions, and all other bad stuffs.
I created javascript modules, which I would like to test with jasmine. Some of these happens to depend on some of old javascript files. If I tried to include all old sources using and , it will blow up since old sources need to be included in order and some of them cannot be included together. Does anyone who have the same situation would like to share how you solve this issue?
I also tried to include the dependent javascript in the script file using $.getScript, however, one of the issue I ran into was that jasmine-maven-plugin ran all the spec in one run. Therefore, $.getScript will load conflict sources and the test blow up again.