Skip to content

Is there a way to get test status on afterEach() method ? #840

Closed
@subash-canapathy

Description

@subash-canapathy

Issuehunt badges

mocha has a way of getting the test status on the after* hooks to do customized teardowns. currentTest.status
this is required for UI tests running on saucelabs and that feature in mocha was born out of the same need: mochajs/mocha#797

It would be super useful to have the test status exposed as metadata OR contextual information

Proposal A:
t.context.result - to contain the result object (the one which goes to the reporter)

Proposal B:
t.getTestStatus() - a method available only on the afterEach hook to get status of the test.


IssueHunt Summary

bunysae bunysae has been rewarded.

Backers (Total: $40.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions