-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Use more visually-distinctive characters on the 'dot' reporter #2000
Conversation
The tests are failing in a completely different way on my local machine than on Travis; and I'm really not familiar with the test-suite; does anybody with a more intimate knowledge of the codebase know why such an extremely simple change (and exclusively in code that affects output, to boot!) might be trashing up so many unrelated tests? I'm happy to fix it, I just don't even know where to start. It seemed like such a simple change. 😑 |
There's integration tests that are failing, which read output from mocha to verify correct functionality. If you look at some of the errors, the exclamation mark is being prepended to some extracted strings used in assertions: https://travis-ci.org/mochajs/mocha/jobs/95875913#L1640 |
In any case, this could be a breaking change for tools that wrap or work with mocha |
Really? Shouldn't those tools be wrapping the And, hm, I see the |
It looks like there's 3 files that just need to have https://github.com/mochajs/mocha/search?utf8=%E2%9C%93&q=runMocha&type=Code |
In the case of |
what's the need for this? I'm leaning towards closing this one. |
Nvm, it's only a single test file that has failures. Try running Quick fix to make things pass: lines = res.output
.split(/[\n․]+/)
// =>
lines = res.output
.split(/[\n․!,]+/) Or even better, update the split to use lib/reporters/base.symbols |
@boneskull The PR makes it easier to distinguish between passing/failing/pending tests in the output. For example, rspec uses:
Rather than simply vary the dots by color. |
I'll take a look at fixing it myself later tonight! Thanks for helping with So the question now is: is ‘scraping’ the ANSI/pretty reporters a supported As for the why: like I said above, it's very visually indistinct; besides (At the very least, can we switch to commas/exclamations when COLOUR is
|
OK. This is a change in Mocha's output. Due to past experiences with this, I have to recommend this wait for a major release. We can release v3 and make #1969 v4 if someone wants to work out the merges. |
Looks like this is similar to #1702 |
@danielstjules good catch! Yeah, these are trying to fix similar problems, in different ways. His is an alternative option, whereas my point is that the current behaviour is actively user-hostile and that the defaults should be changed. But yeah, only one of these needs to be taken. Note: Fixed the test that was failing according to your instructions. Also rebased on top of current mainline. (= |
56a234d
to
f449615
Compare
Just checking if this is still welcome? @boneskull, @danielstjules? (Edit: Keeping it rebased on-top of current master.) |
f449615
to
4559fae
Compare
@ELLIOTTCABLE I think we want to do this, but we can't merge it, unless we do another major release. I'm busy working on #1969. If someone wishes to coordinate a major before that lands, I'm happy to release it. cc @mochajs/mocha |
to that end, I'm going to tentatively schedule this for the v3 milestone |
if we do end up doing a major before #1969, then this may need rebasing against the |
fixed in v3.0.0 branch via a8e63d1 and dedf03d @ELLIOTTCABLE thanks! |
I see that on non-Windows, the characters are usually some Unicode; is there any particular pretty characters people would rather see than
!
and,
? (Personally, I think this looks really, really great even with those basic characters.)