I have several JS files so instead of copy and paste every one in the console window (Firefox and Chromium), I would want to call them from the shell if it is possible.
Every JS file has test functions that show if they are correct using console.log.
If your tests need access to a DOM there is always PhantomJS – a headless (Webkit) browser.