Last active
March 4, 2019 09:47
-
-
Save another-guy/0d76eedb09d54db9a11f56c86f416895 to your computer and use it in GitHub Desktop.
Improved then block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.then(jestCliCallResult => { | |
jestCliCallResult.results.testResults | |
.forEach(testResult => { | |
testResult.testResults | |
.filter(assertionResult => assertionResult.status === 'passed') | |
.forEach(({ ancestorTitles, title, status }) => { | |
console.info(` ● ${ancestorTitles} › ${title} (${status})`); | |
}); | |
}); | |
jestCliCallResult.results.testResults | |
.forEach(testResult => { | |
if (testResult.failureMessage) { | |
console.error(testResult.failureMessage); | |
} | |
}); | |
reportTestResults(undefined, jestCliCallResult.results.numFailedTests); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment