testem-time-reporter
Advanced tools
Comparing version 1.0.1 to 1.1.0
10
index.js
@@ -11,2 +11,3 @@ /* eslint-env node */ | ||
this.tests = {}; | ||
this.failures = []; | ||
this.longestTest = { runDuration: 0 }; | ||
@@ -32,2 +33,3 @@ } | ||
write(typeof data.error === 'string' ? data.error : JSON.stringify(data.error, null, 2)); | ||
this.failures.push(data); | ||
} | ||
@@ -64,2 +66,10 @@ if (data.passed) { | ||
} | ||
if (this.failures.length) { | ||
write('\n Failing tests: \n'); | ||
this.failures.forEach(data => { | ||
write(chalk.red(`\nTest Failure - ${data.name.trim()}\n`)); | ||
write(JSON.stringify(data.error.message, null, 2) + '\n'); | ||
write(typeof data.error === 'string' ? data.error : JSON.stringify(data.error, null, 2)); | ||
}); | ||
} | ||
write(`\nLEGEND: ${chalk.blue('Skipped')} ${chalk.magenta('Tests > 2 seconds')} ${chalk.red('Tests > 1 second')} ${chalk.yellow('Tests > 0.5 seconds')}\n`); | ||
@@ -66,0 +76,0 @@ } |
{ | ||
"name": "testem-time-reporter", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A testem reporter for highlighting tests", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7350
126