-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
Oh wow - that's what I call a PR. Nice one! Will have a look right now. :) Thanks. |
}, | ||
|
||
reportToFile: function(test) { | ||
fs.mkdir('tmp', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're creating a directory here, which won't be removed after test run.
We may want to remove it afterwards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now fs.rmdir
wouldn't run if any of the assertions failed. I'd suggest placing it in /tmp or the os tmp dir :) https://github.com/raszi/node-tmp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for taking the time. A had a few notes - maybe we wanna discuss these. The actual implementation is a bit hard to understand at the beginning - but I thought about it and probably wouldn't come to a nice solution. So this might be fine. :) Maybe we can add some comments or something? I'm not sure about it. Overall really good PR. Thanks for that. Maybe @paazmaya can also have a look. :) And yeah 👍 👍 👍 for some clean up!!! |
You're welcome. Actually I'd find it cleaner if the jsinspect module would offer the write to file part. That way we wouldn't have to use such a hack. Maybe we should send another PR to the other repo... |
Agree on that - maybe we wanna keep this one open, until @danielstjules decides that he would take it? |
If I was using npm scripts or make, I'd just pipe the output: I guess one improvement would be to update the reporters to accept the stream to write to, rather than assume process.stdout. |
Hah, was expecting this reply. ;)
Might work yes. What do you think about providing the reporter result with the https://github.com/stefanjudis/grunt-jsinspect/blob/master/tasks/jsinspect.js#L64-L66 E.g.
|
@danielstjules See danielstjules/jsinspect#24 - I'm about to fork your repo. Will create a PR. |
PR created: danielstjules/jsinspect#25 |
I like the idea of accepting a writable stream. Makes integration tests super easy as well, since capturing stdout from mocha is a PITA :) |
PR danielstjules/jsinspect#25 has been accepted. Thanks @danielstjules! |
Good job @borisdiakur! 🎉 |
Just pushed a new release :) Please note that I renamed the option. Thanks for your patience, and all your help! |
👍 🎉 Nice example of open source collaboration! Love it! |
That was fast! Thanks again @danielstjules! Ok, I guess it's my turn now. Hang tight! |
This commit includes the actual implementation... - added reportToFile test - updated readme with new option outputPath - passing a writable stream to jsinspect reporters - bumped jsinspect version to 0.7.0 ...and some cleanup - adjusted eslint rules to chosen code style - removed unused files - simple license entry (so that npm doesn't complain anymore) - removed unnecessary grunt-contrib-clean dep and call
The PR should be 👌 now. @stefanjudis: Your turn. |
tmp is nice! |
Sweet 🍠 ! |
okay looks good to me. :) |
This pull request resolves #17
by hooking into. To do that the user can set one additional optionprocess.stdout
and writing the reporter output to a fileoutputPath
. The path includes filename and extention (two options, reportFormat and reportFile, seemed redundant).I also did some cleanup, hope you don't mind (see commits).