Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using watch displays test results twice #265

Open
ezk84 opened this issue Aug 31, 2018 · 0 comments
Open

Using watch displays test results twice #265

ezk84 opened this issue Aug 31, 2018 · 0 comments

Comments

@ezk84
Copy link

ezk84 commented Aug 31, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant