Sha256: afdd6a2fd82d175d7b969860f4bb2e1291663efbe74f0fac0fdf0d9e9363e09d

Contents?: true

Size: 1.1 KB

Versions: 17

Compression:

Stored size: 1.1 KB

Contents

var BaseReporter = require('./base');


var DotsReporter = function(formatError, reportSlow) {
  BaseReporter.call(this, formatError, reportSlow);

  var DOTS_WRAP = 80;

  this.onRunStart = function() {
    this._browsers = [];
    this._dotsCount = 0;
  };

  this.onBrowserStart = function(browser) {
    this._browsers.push(browser);
  };

  this.writeCommonMsg = function(msg) {
    if (this._dotsCount) {
      this._dotsCount = 0;
      msg = '\n' + msg;
    }

    this.write(msg);

  };


  this.specSuccess = function() {
    this._dotsCount = (this._dotsCount + 1) % DOTS_WRAP;
    this.write(this._dotsCount ? '.' : '.\n');
  };

  this.onBrowserComplete = function(browser) {
    this.writeCommonMsg(this.renderBrowser(browser) + '\n');
  };

  this.onRunComplete = function(browsers, results) {
    if (browsers.length > 1 && !results.disconnected && !results.error) {
      if (!results.failed) {
        this.write(this.TOTAL_SUCCESS, results.success);
      } else {
        this.write(this.TOTAL_FAILED, results.failed, results.success);
      }
    }
  };
};


// PUBLISH
module.exports = DotsReporter;

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.4.1 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.4.0 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.3.0 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.2.1 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.2.0 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.1.0 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.0.8 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.0.7 jasmine/node_modules/karma/lib/reporters/dots.js
hooch-0.0.6 jasmine/node_modules/karma/lib/reporters/dots.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/lib/reporters/dots.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/lib/reporters/dots.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/lib/reporters/dots.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/lib/reporters/dots.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/lib/reporters/dots.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/lib/reporters/dots.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/lib/reporters/dots.js