Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add ability to add up before() runtime with it() runtime #700

Closed
Almad opened this Issue Jan 3, 2013 · 5 comments

Comments

Projects
None yet
2 participants

Almad commented Jan 3, 2013

--slow is highlighting only long running tests, measuring only time it() took to execute.

This leads to missed slow tests if slow part is hidden in test preparation (in before()).

It would be useful to have some option (--measure-before ?) to highlight tests that are above threshold together with appropriate before(Each)().

Contributor

tj commented Jan 8, 2013

yeah there's been some discussion about this, it's a bit of a tough call, I dont want to bloat mocha with a bunch more options, I think we should just come to a conclusion on what's expected. I'm a bit torn between the two personally, we could also clutter the output a bunch more and add both but that's pretty ugly

Almad commented Jan 8, 2013

Well it depends on the testing pattern. Personaly mine is to have one assert per it, so I usually do some call in before() and then verify multiple expectations in multiple it()'s so I can see all failures at once.

Of course then, timing that omits before is pretty much useless to me.

Contributor

tj commented Jan 8, 2013

im leaning towards it being additive and we leave it at that for now, at least then there's the indication of what is causing the entire suite to bog down

Almad commented Jan 8, 2013

cool

Contributor

tj commented Jan 11, 2013

dup of #419

@tj tj closed this Jan 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment