Is there console.log output support to terminal/command-line with intern-runner?
How console.log
works with intern-runner
depends on where your test code is running. Unit tests (specified with suites
) run in the browser, so that's where console.log
output ends up. There isn't currently a way to get console output out of a browser for unit tests.
Functional tests (specified with functionalSuites
) control a browser, but actually run in Node.js, so output from console.log
statements in functional tests generally goes to intern's stdout. The exceptions are log statements in execute
and executeAsync
blocks; since those blocks run in the browser, that's where the log output ends up. You can retrieve browser logs in functional tests using getLogsFor('browser')
, but WebDriver log support is inconsistent between browsers.