Skip to content

Using watch displays test results twice #265

@ezk84

Description

@ezk84

If I use the preferred development mode as per the README with the current version of karma, the reported results are output twice.

Here is an example project which reproduces the error.
gruntkarmadoubleoutput.zip
Run

npm install
grunt karma:continuous # to see expected output
grunt dev # and change a file in src to see erroneous double output

I've added two dummy assertions to demonstrate that it is double output and not just the same tests being run twice. The random numbers produced by Math.random are the same in both versions.

This seems to be because both the karma server and the client are writing the results to stdout.
If I create a similar karma.conf.js and run karma start and karma run on different consoles, each will output a version of the results.

Seems like grunt-karma should somehow set the karma runner to not output the results since the server (running in the background) will already output them. Alas, there doesn't seem to be a configurable way to do this from grunt-karma.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions