Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

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

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

Almad opened this issue Jan 3, 2013 · 5 comments

Comments

@Almad
Copy link

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)().

@tj
Copy link
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
Copy link
Author

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.

@tj
Copy link
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
Copy link
Author

Almad commented Jan 8, 2013

cool

@tj
Copy link
Contributor

tj commented Jan 11, 2013

dup of #419

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants