Search code examples
code-coverageintern

Generating HTML report from browser


When using intern locally in the browser through intern/client.html?config=test/intern, is it possible to generate an html report file if my test/intern.js file is defined as:

define({
    ...
    reporters: ['html']
});

Or the is the file generation possible only when running from node?

Also, how can I set the location where the report file will be saved?


Solution

  • As you guessed, file generation is only supported from Node (using intern-client or intern-runner). The browser client is not capable of generating files, and in any case the 'html' reporter provided with Intern can only generate HTML output in a browser, so currently the only built-in way to get an HTML test report file is to manually save the report from the browser.