Consider whether to enable ESLint rule no-console on tests
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(Not tracked)
People
(Reporter: standard8, Unassigned)
References
(Depends on 1 open bug)
Details
We are currently enabling the ESLint rule no-console
on production files (bug 1881519). At this time we are unsure about whether we want to enable it on tests or not.
Tests currently have the option for info()
logging, which works better than console
because it is logged asynchronously with respect to everything else.
However, another option may be to fix the synchronous issues with test logging, and switch from info()
to console
instead.
In particular, it looks like at least some of the testing/
code is using nsIConsoleService
/ nsIConsoleListener
, rather than the items associated with console
, so I think it would potentially be useful to look at the differences there and see where the asynchronous logging is coming from. If it is fixable, then we could potentially replace the use of info()
with console.info()
instead and likely have richer logging.
Description
•