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

Output junit reports if CI env var is set #182

Merged
merged 2 commits into from
Dec 18, 2017
Merged

Conversation

victorb
Copy link
Member

@victorb victorb commented Dec 13, 2017

Adds junit output if env var CI is set to true.

@ghost ghost assigned victorb Dec 13, 2017
@ghost ghost added the status/in-progress In progress label Dec 13, 2017
@codecov
Copy link

codecov bot commented Dec 13, 2017

Codecov Report

Merging #182 into master will increase coverage by 0.79%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
+ Coverage   77.37%   78.16%   +0.79%     
==========================================
  Files           6        6              
  Lines         137      142       +5     
==========================================
+ Hits          106      111       +5     
  Misses         31       31
Impacted Files Coverage Δ
src/config/webpack/index.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b5f148...8886ced. Read the comment docs.

})
after(() => {
console.log.restore()
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log from IRC about this:

16:10:08 <@victorbjelkholm> dignifiedquire: the only reason is to temporary hide the output of the lint command right?
16:10:38 <@dignifiedquire> yes, otherwise it will spew the console potentially during a test run with lint output, which is not that helpful
16:10:51 <@victorbjelkholm> because having some troubles with another reporter, for jenkins, that adds some functionality (saves the console.log output together with the junit report) which breaks that. I commented out the hiding of that and things work fine, but shows the lint output
16:11:14 <@victorbjelkholm> specifically it's this part which doesn't work well with console.log being stubbed: https://github.com/juhovh/mocha-jenkins-reporter/blob/master/lib/jenkins.js#L321-L327
16:11:15 <@dignifiedquire> hmm that is really strange
16:12:06 <@dignifiedquire> oh :( yeah they are using console.log  directly that is unfortunate
16:12:15 <@dignifiedquire> regular mocha reporters use process.stdout
16:13:30 <@victorbjelkholm> dignifiedquire: hm, what do you mean? It's saving the output from console.log's in tests
16:13:34 <@dignifiedquire> it's not the end of the world to remove this in the tests, but might be good to file a bug that they shouldn't rely on console.log working
16:13:51 <@dignifiedquire> oh now I understand sorry
16:13:53 <@victorbjelkholm> it's to capture debug output from the tests
16:13:58 <@dignifiedquire> yeah that's just bad practice :(
16:14:09 <@dignifiedquire> they should be capturing process.stdout and stderr
16:14:12 <@victorbjelkholm> yeah :/ But guess to work with existing tests rather than adding a new function
16:14:19 <@victorbjelkholm> console.logs ends up on process.stdout?
16:14:26 <@victorbjelkholm> well, it should
16:14:29 <@dignifiedquire> if all is set up well yes
16:14:36 <@dignifiedquire> and console.error ends up on     stderr
16:16:31 <@victorbjelkholm> ok. I'll remove the mocking for now, and open a issue on the reporters repository to hopefully fix it

TLDR: plugin is bad and changes the way console.log logs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right, is the issue to track this open?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was sure I opened it yesterday but forgot to submit. Anyways, is here now: juhovh/mocha-jenkins-reporter#75

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps open one also in this repo so that one is easy to find

@victorb
Copy link
Member Author

victorb commented Dec 14, 2017

Oh, right! This PR is missing exporting a report for webworker tests. I was unable to get the reporter to work with the webworker code. @dryajov maybe you could help out here, think you implemented the webworker tester, correct?

@ghost ghost assigned dryajov Dec 14, 2017
@daviddias
Copy link
Member

Ok, this is LGTM. However, aegir is kind of blocked on releasing until #181 is figured out. Can we have some extra hands there? Thank you!

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.

4 participants