You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A jest reporter can register 5 callbacks right now:
onRunStart - when the runner is first initiated
onTestStart - when a suite is first run
onTestResult - when a suite has completed
onRunComplete - when the runner has completed
getLastError
What is the expected behavior?
I would like some more granularity for the reporter API.
Specifically I would like callbacks for when an individual test is run and complete.
The jasmine API has specStarted and specDone for this purpose.
But right now the jest reporter API doesn't seem to provide the ability to have a callback before and after a given test is run - only callbacks for when the parent suite is run.
For example with the following test.spec.js file onTestStart is only called once even though there are two tests:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
A jest reporter can register 5 callbacks right now:
onRunStart - when the runner is first initiated
onTestStart - when a suite is first run
onTestResult - when a suite has completed
onRunComplete - when the runner has completed
getLastError
What is the expected behavior?
I would like some more granularity for the reporter API.
Specifically I would like callbacks for when an individual test is run and complete.
The jasmine API has specStarted and specDone for this purpose.
But right now the jest reporter API doesn't seem to provide the ability to have a callback before and after a given test is run - only callbacks for when the parent suite is run.
For example with the following test.spec.js file onTestStart is only called once even though there are two tests:
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Jest: 21.1.0
OS: Mac OSX 10.12.6
Yarn: 0.27.5
The text was updated successfully, but these errors were encountered: