karma-runner / karma-runner/karma

The colored output in karma run depends on how karma start was executed

Open
#1,334 0 comments 0 reactions 0 assignees View on GitHub
type: backlog
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to run both `karma start` and `broccoli-karma` (a wrapper around `karma.runner` function) in a single terminal. For the matter of this bug, `broccoli-karma` can be substituted with `karma run`, they both produce the same results.
The problem is that both `karma start` and `broccoli-karma` print test results, and I end up having duplicated output in the terminal. I can't disable the output of `broccoli-karma` as it prints additional error messages whenever the build fails. So, the natural thing to do is to disable the output of `karma start`.
This, however, for some reason also disables colorful output in `karma run` or call to the `karma.runner` done within `broccoli-karma`.
There might be another way to solve my problem, but I consider the behaviour described to be a bug.

The problem is also reproducible in separate terminals: execute `karma start > /dev/null` and `karma run`.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with `karma start > /dev/null` followed by `karma run`, then inspect the `karma start`, `karma run`, and `karma.runner` entry points. Compare how output and color settings are initialized in each path; done means redirected `karma start` output no longer disables colorful output from `karma run` or a `karma.runner` call.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.