allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

Allure-Mocha: add test name to beforeEach name

Open aposiker opened this issue 3 years ago • 1 comments

When I have beforeEach in my test suite and add test steps inside it will result in a report as several calls of beforeEach for each test. This happens because all beforeEach hooks will have exactly the same name

Describe the solution you'd like A possible solution from my perspective here could be adding the name of the test on which beforeEach hook was called to the hook's name in report

Describe alternatives you've considered

Additional context image

on the screenshot you can see the report for suite with 4 tests and beforeEach hook

aposiker avatar Feb 23 '22 11:02 aposiker

Any updates about this issue?

lbltnmrgnv avatar Oct 04 '22 11:10 lbltnmrgnv

Could you please share the code example here?

epszaw avatar Oct 18 '22 10:10 epszaw

Could you please share the code example here?

https://github.com/lbltnmrgnv/repro

lbltnmrgnv avatar Oct 18 '22 10:10 lbltnmrgnv