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

Mocha-lcov now has file pushing capabilites #3

Closed
wants to merge 2 commits into from

Conversation

Quazie
Copy link

@Quazie Quazie commented Jan 20, 2014

Based off of work in peerigon/xunit-file mocha-lcov-reporter can now write to a file.

@StevenLooman
Copy link
Owner

Hi @Quazie. Thank you for the pull request. I'm curious though, isn't redirecting the output to a file sufficient?

@Quazie
Copy link
Author

Quazie commented Jan 21, 2014

There are a number of ways to get Mocha running multiple reporters at once ( I am using the pull request associated with mochajs/mocha#930 ) - by having the reporter automatically report to a file I can use stdout for something useful to look at such as the spec reporter

@StevenLooman
Copy link
Owner

@Quazie I'll merge it as soon as the mochajs/mocha#930 pull request itself is merged.

I am a bit hesitant as I don't want to cause any headaches for the current users of the mocha-lcov-reporter. It tries to open the file config.json. The reporter (probably, haven't tested it yet) errors when it can't find the file. Later this week, I'll take a look at it.

For now, isn't running mocha multiple times sufficient? I'm guessing you are using the coverage data either in a CI environment (in this case, running it multiple times doesn't seem to be that much of a problem), or are using the coverage data in an IDE which is continuously updated (in this case, multiple reporters minimizes the required background work.)

@Quazie
Copy link
Author

Quazie commented Jan 22, 2014

For now i'm using my branch, so realistically I'm fine without this being merged in yet - I just have found things like xuint-file to be very helpful, so I decided to give back my adaptation of your code.

@honzajavorek
Copy link

@Quazie FWIW, the reporter was just changed in a way it's easier to override how it presents its output: #16 I think that can allow you to do what you wish even without modifications to the code (I believe our motivations were similar).

@Quazie Quazie closed this May 14, 2019
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

Successfully merging this pull request may close these issues.

3 participants