How to use the testem/lib/reporters/tap_reporter.prototype function in testem

To help you get started, we’ve selected a few testem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emberjs / ember.js / lib / failure-only-testem-reporter.js View on Github external
var TapReporter = require('testem/lib/reporters/tap_reporter');

function FailureOnlyReporter() {
  TapReporter.apply(this, arguments);
  this._reportCount = 0;
}

FailureOnlyReporter.prototype = Object.create(TapReporter.prototype);
FailureOnlyReporter.prototype.constructor = FailureOnlyReporter;

FailureOnlyReporter.prototype.display = function(prefix, result) {
  this._reportCount++;

  if (!result.passed) {
    TapReporter.prototype.display.apply(this, arguments);
  }

  if (this._reportCount > 100) {
    this.out.write('pass count: ' + this.pass);
    this._reportCount = 0;
  }
};

module.exports = FailureOnlyReporter;
github emberjs / ember.js / lib / failure-only-testem-reporter.js View on Github external
FailureOnlyReporter.prototype.display = function(prefix, result) {
  this._reportCount++;

  if (!result.passed) {
    TapReporter.prototype.display.apply(this, arguments);
  }

  if (this._reportCount > 100) {
    this.out.write('pass count: ' + this.pass);
    this._reportCount = 0;
  }
};

testem

Test'em 'scripts! Javascript Unit testing made easy.

MIT
Latest version published 2 months ago

Package Health Score

89 / 100
Full package analysis