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

Change default reporter to spec #1228

Closed
jonathanong opened this issue May 28, 2014 · 15 comments
Closed

Change default reporter to spec #1228

jonathanong opened this issue May 28, 2014 · 15 comments

Comments

@jonathanong
Copy link
Contributor

Personally I only use spec. I think the default dot-based reporter is essentially useless. Knowing what you're testing is as important as the tests themselves.

@tunnckoCore
Copy link

I agree.

@evanlucas
Copy link

+1

@hallas
Copy link

hallas commented Jun 19, 2014

👍 lets do this @travisjeffery

@boneskull
Copy link
Contributor

I'd also agree. I never use the dot reporter. In what situation is "less output" at the expense of "little information" better?

@mantoni
Copy link
Contributor

mantoni commented Jul 24, 2014

Oh noes! Why did you change my test output just like this? There was an option to override, well documented - and now you are forcing everybody who was happy with the dots to go through all their projects and add this option?

@boneskull Reducing noise is very very usefull to me during development. I only care about failing tests. If all is green, then this is the only information I need. But that's just me, apparently.

@jonathanong
Copy link
Contributor Author

maybe we should have a .mocharc for defaults like this?

@mantoni
Copy link
Contributor

mantoni commented Jul 24, 2014

That makes sense.

Other than that I would have left changing the default value to the next major release. Do you care to revert until 2.0?

@jonathanong
Copy link
Contributor Author

well this doesn't actually break anything so there really isn't a point in switching back and forth.

@boneskull
Copy link
Contributor

@jonathanong agreed, I don't see this sort of functionality necessitating a wait for a major release.

@graue
Copy link

graue commented Aug 8, 2014

I'd appreciate any future changes of this nature being accompanied by a major version bump. Having to go change every project's config in response to a minor bump is an unpleasant surprise.

Thanks for your work on Mocha.

@boneskull
Copy link
Contributor

Major version X (X.y.z | X > 0) MUST be incremented if any backwards incompatible changes are introduced to the public API.

This was not a breaking API change.

SemVer does not mention "output" (maybe on purpose). If you consider Mocha to be a "function", the input is the code under test and expectations, and the output is a list of passing/failing tests. Even in that scenario, nothing broke, because the same input still produces the same output.

This sort of disagreement reinforces the need to split the reporters out into separate modules, perhaps even providing no default reporter, so the user must be explicit.

I apologize if this was an inconvenience for some, but the default was an inconvenience for others. You can't make everybody happy all the time. 😄

@graue
Copy link

graue commented Aug 8, 2014

Don't get me wrong — I accept that this is a done deal, and am not asking for it to be changed again just to revert to the old default. I've already added -R dot to my scripts and moved on. I also don't necessarily disagree with your interpretation of SemVer. But it is nice to keep defaults consistent within minor releases as a courtesy to users. Mocha has a lot of options. Most of us will always use the defaults for most of those options, and changing them without an overwhelming reason to do so creates unnecessary work for us. For people not actively hacking on Mocha, we want it to "just work" so we can focus on other problems. Do you see where I'm coming from?

@golyshevd
Copy link

There is breakin change. Some dependents may use output. It is like change of returning type

@boneskull
Copy link
Contributor

@golyshevd Sorry, but if you're consuming the output of human-readable reporters like dots or spec, you're making a mistake.

@boneskull
Copy link
Contributor

@graue I understand, but "just working" to you may not be "just working" to someone else. To me, before and after the change, it still "just works"--I don't rely on defaults. Even as a casual user of libraries, this is how I tend to operate. Considering npm's behavior vs. reality (not everyone adheres to SemVer), that's kept me out of some trouble.

I apologize, but I'm going to lock this issue, as I don't see the change being reverted. I expect this debate will be taken into consideration when changing defaults in the future. I'd love it if more casual users of Mocha (or any project!) would keep abreast of the issues and PRs, so their voices can be heard before controversial changes are made.

thanks,
Chris

@mochajs mochajs locked and limited conversation to collaborators Aug 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants