Skip to content

Instantly share code, notes, and snippets.

@a0viedo
Created September 21, 2018 20:45
Show Gist options
  • Save a0viedo/4a7976df30998b1620b4de3c552e9e89 to your computer and use it in GitHub Desktop.
Save a0viedo/4a7976df30998b1620b4de3c552e9e89 to your computer and use it in GitHub Desktop.
function getFailedTests(suite) {
return suite.tests.filter(test => test.state === 'failed').length;
}
const testsList = this.test.parent.suites.map(suite => getFailedTests(suite));
const numberOfFailedTests = testsList.reduce((a,b) => a+b, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment