Skip to content

Commit ce4ce8a

Browse files
committed
[Refactor] Test: minor tweaks
1 parent 6cd06f5 commit ce4ce8a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/test.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ function Test(name_, opts_, cb_) {
8888
this._timeout = args.opts.timeout;
8989
this._plan = undefined;
9090
this._cb = args.cb;
91+
this.ended = false;
9192
this._progeny = [];
9293
this._teardown = [];
9394
this._ok = true;
95+
this._objectPrintDepth = 5;
9496
var depthEnvVar = process.env.NODE_TAPE_OBJECT_PRINT_DEPTH;
9597
if (args.opts.objectPrintDepth) {
9698
this._objectPrintDepth = args.opts.objectPrintDepth;
@@ -100,14 +102,11 @@ function Test(name_, opts_, cb_) {
100102
} else {
101103
this._objectPrintDepth = depthEnvVar;
102104
}
103-
} else {
104-
this._objectPrintDepth = 5;
105105
}
106106

107-
var self = this;
108-
for (var prop in self) {
109-
if (typeof self[prop] === 'function') {
110-
self[prop] = callBind(self[prop], self);
107+
for (var prop in this) {
108+
if (typeof this[prop] === 'function') {
109+
this[prop] = callBind(this[prop], this);
111110
}
112111
}
113112
}

0 commit comments

Comments
 (0)