I'm trying to write some simple tests on JS code that can be run from the command line to test code that has nothing to do with HTML, documents or user interface. To do this I need to include one file within another to pull the code being tested into the test script. What I've found involved HTML or DOM to do the job; for example, something like document.write( ) or some such. Is there a simple way to do this? I'm imaging something like include( "code2test.js" ); I'd appreciate any help in solving this. Can JQuery help or does it have to be used in a HTML/browser context?
Thanks in advance.j