Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

testem-time-reporter

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testem-time-reporter - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

28

index.js

@@ -17,14 +17,14 @@ /* eslint-env node */

function writeFailure (data) {
write(chalk.red(`\nTest Failure - ${data.name.trim()}\n`));
if (data.error) {
write(JSON.stringify(data.error.message, null, 2) + '\n');
write(typeof data.error === 'string' ? data.error : JSON.stringify(data.error, null, 2));
} else {
write(chalk.red(`\t Test failed with no error object. ${JSON.stringify(data)}`));
}
this.failures.push(data);
}
TimeReporter.prototype = {
writeFailure: function (data) {
write(chalk.red(`\nTest Failure - ${data.name.trim()}\n`));
if (data.error) {
write(JSON.stringify(data.error.message, null, 2) + '\n');
write(typeof data.error === 'string' ? data.error : JSON.stringify(data.error, null, 2));
} else {
write(chalk.red(`\t Test failed with no error object. ${JSON.stringify(data)}`));
}
this.failures.push(data);
},
TimeReporter.prototype = {
report: function (prefix, data) {

@@ -37,3 +37,3 @@ this.runDuration += data.runDuration;

if (data.failed) {
writeFailure(data);
this.writeFailure(data);
}

@@ -76,4 +76,4 @@ if (data.passed) {

if (this.failures.length) {
write('\n Failing tests: \n');
this.failures.forEach(writeFailure);
this.write('\n Failing tests: \n');
this.failures.forEach(this.writeFailure);
}

@@ -80,0 +80,0 @@ write(`\nLEGEND: ${chalk.blue('Skipped')} ${chalk.magenta('Tests > 2 seconds')} ${chalk.red('Tests > 1 second')} ${chalk.yellow('Tests > 0.5 seconds')}\n`);

{
"name": "testem-time-reporter",
"version": "1.2.1",
"version": "1.2.2",
"description": "A testem reporter for highlighting tests",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc