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

quiet flag to hide script name in output #17

Merged
merged 1 commit into from
Apr 18, 2016
Merged

Conversation

alxndr
Copy link
Contributor

@alxndr alxndr commented Apr 18, 2016

This adds an optional "quiet" flag to the full script config object, which if set to "true" will hide the script name prefix in the output on stdout and stderr.

@alxndr
Copy link
Contributor Author

alxndr commented Apr 18, 2016

Added this option because without it, the output for a Mocha suite has some, not all, of its newlines prefixed with the script name, thus messing up the nesting nature of the spec reporter. For example, see "[test]" in this screenshot:

screen shot 2016-04-17 at 22 07 51

Relevant parts of package.json:

"scripts": {
  "test": "npm run test:js",
  "test:js": "babel-node node_modules/.bin/isparta cover _mocha -- --ui exports --recursive --formatter spec test/**",
  "watch": "npm-watch",
},
"watch": {
  "test": "{lib,test}/**/*.js"
},

@grncdr
Copy link
Collaborator

grncdr commented Apr 18, 2016

TBH I'd like to fix the bug as well, but I don't see any harm in having this option as well. Thanks for the PR!

@grncdr grncdr merged commit 6c169ea into M-Zuber:master Apr 18, 2016

```javascript
{
"watch": {
"test": {
"patterns": ["src", "test"],
"extensions": "js,jsx",
"ignore": "src/vendor/external.min.js"
"ignore": "src/vendor/external.min.js",
"quiet": "true"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@alxndr any reason this isn't a boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, nope!

@alxndr
Copy link
Contributor Author

alxndr commented Apr 18, 2016

Filed #18

I'd guess the bug has something to do with stream buffering...

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.

2 participants