Skip to content
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

Correctly report information from before/after hooks #45

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

just-boris
Copy link
Contributor

This is a port of changes from 1.x adapter:

Mocha emits test end event before afterEach hooks are being invoked. So, we should not remove the currentTest reference from the lifecycle to be able to store more attachments and steps.

Mocha can emit multiple fail events for a single test. First, when the test fail, second – from the afterEach hook if it fails too. We should report the test failure, because it is more important.

Added unit-tests check this behavior.

Checklist

@just-boris just-boris merged commit cbbb449 into allure-framework:master Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants