In my current setup, I have two JavaScript files - a.js
and b.js
. The input data is stored in a.js
, while the unit tests are written in b.js
. Now, the challenge I am facing is how to access the input data from a.js
in b.js
. I understand that both files can be included in an HTML page, but since b.js
contains qUnits for testing JavaScript methods (similar to jUnits) which are run from a build.xml
file, using HTML is not an option.
I initially attempted to call the methods of a.js
from b.js
, given that they are in the same directory. However, this approach did not yield the desired results.
Are there any alternative methods that I could employ to utilize the data from a.js
in b.js
? Any insights or suggestions would be greatly appreciated.