Skip to content

Commit da39639

Browse files
committed
rename TestData => RunStatus
I missed this while refactoring the API refactor PR.
1 parent dcfd6a1 commit da39639

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/run-status.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var flatten = require('arr-flatten');
88
var figures = require('figures');
99
var formatter = require('./enhance-assert').formatter();
1010

11-
function TestData(opts) {
12-
if (!(this instanceof TestData)) {
11+
function RunStatus(opts) {
12+
if (!(this instanceof RunStatus)) {
1313
throw new TypeError('Class constructor TestData cannot be invoked without \'new\'');
1414
}
1515
EventEmitter.call(this);
@@ -31,15 +31,15 @@ function TestData(opts) {
3131
this.stats = [];
3232
this.tests = [];
3333

34-
Object.keys(TestData.prototype).forEach(function (key) {
34+
Object.keys(RunStatus.prototype).forEach(function (key) {
3535
this[key] = this[key].bind(this);
3636
}, this);
3737
}
3838

39-
util.inherits(TestData, EventEmitter);
40-
module.exports = TestData;
39+
util.inherits(RunStatus, EventEmitter);
40+
module.exports = RunStatus;
4141

42-
TestData.prototype.observeFork = function (emitter) {
42+
RunStatus.prototype.observeFork = function (emitter) {
4343
emitter
4444
.on('teardown', this.handleTeardown)
4545
.on('stats', this.handleStats)
@@ -61,7 +61,7 @@ function normalizeError(err) {
6161
return err;
6262
}
6363

64-
TestData.prototype.handleRejections = function (data) {
64+
RunStatus.prototype.handleRejections = function (data) {
6565
this.rejectionCount += data.rejections.length;
6666

6767
data.rejections.forEach(function (err) {
@@ -73,7 +73,7 @@ TestData.prototype.handleRejections = function (data) {
7373
}, this);
7474
};
7575

76-
TestData.prototype.handleExceptions = function (data) {
76+
RunStatus.prototype.handleExceptions = function (data) {
7777
this.exceptionCount++;
7878
var err = normalizeError(data.exception);
7979
err.type = 'exception';
@@ -82,11 +82,11 @@ TestData.prototype.handleExceptions = function (data) {
8282
this.errors.push(err);
8383
};
8484

85-
TestData.prototype.handleTeardown = function (data) {
85+
RunStatus.prototype.handleTeardown = function (data) {
8686
this.emit('dependencies', data.file, data.dependencies, this);
8787
};
8888

89-
TestData.prototype.handleStats = function (stats) {
89+
RunStatus.prototype.handleStats = function (stats) {
9090
this.emit('stats', stats, this);
9191

9292
if (this.hasExclusive && !stats.hasExclusive) {
@@ -101,7 +101,7 @@ TestData.prototype.handleStats = function (stats) {
101101
this.testCount += stats.testCount;
102102
};
103103

104-
TestData.prototype.handleTest = function (test) {
104+
RunStatus.prototype.handleTest = function (test) {
105105
test.title = this.prefixTitle(test.file) + test.title;
106106

107107
if (test.error) {
@@ -125,7 +125,7 @@ TestData.prototype.handleTest = function (test) {
125125
this.emit('test', test, this);
126126
};
127127

128-
TestData.prototype.prefixTitle = function (file) {
128+
RunStatus.prototype.prefixTitle = function (file) {
129129
if (!this.prefixTitles) {
130130
return '';
131131
}
@@ -148,11 +148,11 @@ TestData.prototype.prefixTitle = function (file) {
148148
return prefix;
149149
};
150150

151-
TestData.prototype.handleOutput = function (channel, data) {
151+
RunStatus.prototype.handleOutput = function (channel, data) {
152152
this.emit(channel, data, this);
153153
};
154154

155-
TestData.prototype.processResults = function (results) {
155+
RunStatus.prototype.processResults = function (results) {
156156
// assemble stats from all tests
157157
this.stats = results.map(function (result) {
158158
return result.stats;

0 commit comments

Comments
 (0)