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

Add an option to quiet the informational messages. #191

Merged
merged 1 commit into from
Mar 16, 2018
Merged

Add an option to quiet the informational messages. #191

merged 1 commit into from
Mar 16, 2018

Conversation

darrinholst
Copy link
Contributor

The new messages from #97 can be a little distracting when you're used to just the output from mocha. This just adds a --quiet option to stop showing those messages and return to the output behavior pre 1.0.

I'm open to other implementations...would just like the option to opt out of them.

@codecov-io
Copy link

codecov-io commented Nov 6, 2017

Codecov Report

Merging #191 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #191      +/-   ##
=========================================
+ Coverage   96.77%   96.8%   +0.03%     
=========================================
  Files          28      28              
  Lines         744     751       +7     
=========================================
+ Hits          720     727       +7     
  Misses         24      24
Impacted Files Coverage Δ
src/cli/parseArgv.js 97.91% <ø> (ø) ⬆️
src/MochaWebpack.js 100% <100%> (ø) ⬆️
src/runner/testRunnerReporter.js 95.45% <100%> (+0.21%) ⬆️
src/cli/index.js 80% <100%> (+0.68%) ⬆️

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 d9d99a0...49bd011. Read the comment docs.

@astorije
Copy link
Contributor

astorije commented Mar 9, 2018

@darrinholst, could you post a screenshot of an example? It would be cool to compare with #97 :)

@darrinholst
Copy link
Contributor Author

without --quiet:
2e8e42b3-cc0e-4395-b07b-71d5e3b385d9

with --quiet
4d438ffb-a57d-4e02-8878-6e6b087c56f5

Copy link
Contributor

@astorije astorije left a comment

Choose a reason for hiding this comment

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

Very cool!

it('does not show info messages', function (done) {
exec(`node ${binPath} --quiet "${test}"`, (err, stdout) => {
assert.isNull(err);
assert.notInclude(stdout, 'WEBPACK');
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add an assert.include(stdout, 'passing'); or something like this to ensure output is not completely empty and contains the expected output?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zinserjan
Copy link
Owner

Makes sense. Thank you for this!

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