-
Notifications
You must be signed in to change notification settings - Fork 41
use fullTitle of a suite in reporter #79
base: master
Are you sure you want to change the base?
Conversation
Can you provide a screenshot of how the logs look before and after? |
I have two specs now:
This is before: This is after: |
}) | ||
|
||
this.on('suite:start', function (suite) { | ||
this.suitTitles[suite.cid][suite.uid] = suite.fullTitle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is only available in Mocha, how do we deal with this if someone uses a different framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I hadn't thought about it. At least 'parent' attribute is available in Jasmine and Mocha so I can join fullTitle directly in this function. Let me extend it.
Also seems that parent suite always starts before. So I can suggest by the time child suite will start I will already have a name for parent.
@sherlock1982 any updates? |
ping @sherlock1982 |
FWIW, I've just got this copied into our codebase as we need it. Can hopefully get this work incorporated at some point. |
Any progress with this? As it is now, it's encouraged only using one describe block (because only the inner most block is visible), which makes it harder to include beforeEach(), afterEach(), etc..., hooks. |
I have some nested describes in mocha and in junit reporter they look ugly because reporter takes name of inner describe only.
Here's suggested patch to take fullTitle of a suite so in report it will look nicer.
We can make it optional if you want no to break anything.