Skip to content

Remove irrelevant console logs from test output #935

@bajtos

Description

@bajtos

Right now, the output of npm run mocha is littered with random log messages printed by some of the tests. This makes troubleshooting more difficult when one of the tests actually fail (e.g. on our CI), because it's not clear which messages are relevant to the test failure and which are just garbage.

We should fix all our tests so that they don't log anything on success.

Nice to have: an automated checker/linter that will fail the build when a test passes but still prints something to the console.

Acceptance criteria

  • The output of npm run mocha contains only a list of dot characters printed by Mocha's dot reporter.
  • A blog post explaining why it's a bad practice to have tests cluttering console output and what interesting design approaches and hacks we used to get rid of those logs.

Metadata

Metadata

Labels

developer-experienceIssues affecting ease of use and overall experience of LB userstech-debt

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions