@@ -96,7 +96,7 @@ function Test(name_, opts_, cb_) {
96
96
}
97
97
}
98
98
99
- Test . prototype . run = function ( ) {
99
+ Test . prototype . run = function run ( ) {
100
100
this . emit ( 'prerun' ) ;
101
101
if ( ! this . _cb || this . _skip ) {
102
102
return this . _end ( ) ;
@@ -131,7 +131,7 @@ Test.prototype.run = function () {
131
131
this . emit ( 'run' ) ;
132
132
} ;
133
133
134
- Test . prototype . test = function ( name , opts , cb ) {
134
+ Test . prototype . test = function test ( name , opts , cb ) {
135
135
var self = this ;
136
136
var t = new Test ( name , opts , cb ) ;
137
137
$push ( this . _progeny , t ) ;
@@ -154,19 +154,19 @@ Test.prototype.test = function (name, opts, cb) {
154
154
} ) ;
155
155
} ;
156
156
157
- Test . prototype . comment = function ( msg ) {
157
+ Test . prototype . comment = function comment ( msg ) {
158
158
var that = this ;
159
159
forEach ( $split ( trim ( msg ) , '\n' ) , function ( aMsg ) {
160
160
that . emit ( 'result' , $replace ( trim ( aMsg ) , / ^ # \s * / , '' ) ) ;
161
161
} ) ;
162
162
} ;
163
163
164
- Test . prototype . plan = function ( n ) {
164
+ Test . prototype . plan = function plan ( n ) {
165
165
this . _plan = n ;
166
166
this . emit ( 'plan' , n ) ;
167
167
} ;
168
168
169
- Test . prototype . timeoutAfter = function ( ms ) {
169
+ Test . prototype . timeoutAfter = function timeoutAfter ( ms ) {
170
170
if ( ! ms ) throw new Error ( 'timeoutAfter requires a timespan' ) ;
171
171
var self = this ;
172
172
var timeout = safeSetTimeout ( function ( ) {
@@ -178,7 +178,7 @@ Test.prototype.timeoutAfter = function (ms) {
178
178
} ) ;
179
179
} ;
180
180
181
- Test . prototype . end = function ( err ) {
181
+ Test . prototype . end = function end ( err ) {
182
182
var self = this ;
183
183
if ( arguments . length >= 1 && ! ! err ) {
184
184
this . ifError ( err ) ;
@@ -191,15 +191,15 @@ Test.prototype.end = function (err) {
191
191
this . _end ( ) ;
192
192
} ;
193
193
194
- Test . prototype . teardown = function ( fn ) {
194
+ Test . prototype . teardown = function teardown ( fn ) {
195
195
if ( typeof fn !== 'function' ) {
196
196
this . fail ( 'teardown: ' + inspect ( fn ) + ' is not a function' ) ;
197
197
} else {
198
198
this . _teardown . push ( fn ) ;
199
199
}
200
200
} ;
201
201
202
- Test . prototype . _end = function ( err ) {
202
+ Test . prototype . _end = function _end ( err ) {
203
203
var self = this ;
204
204
205
205
if ( ! this . _cb && ! this . _todo && ! this . _skip ) this . fail ( '# TODO ' + this . name ) ;
@@ -249,7 +249,7 @@ Test.prototype._end = function (err) {
249
249
}
250
250
} ;
251
251
252
- Test . prototype . _exit = function ( ) {
252
+ Test . prototype . _exit = function _exit ( ) {
253
253
if ( this . _plan !== undefined && ! this . _planError && this . assertCount !== this . _plan ) {
254
254
this . _planError = true ;
255
255
this . fail ( 'plan != count' , {
@@ -264,7 +264,7 @@ Test.prototype._exit = function () {
264
264
}
265
265
} ;
266
266
267
- Test . prototype . _pendingAsserts = function ( ) {
267
+ Test . prototype . _pendingAsserts = function _pendingAsserts ( ) {
268
268
if ( this . _plan === undefined ) {
269
269
return 1 ;
270
270
}
@@ -394,23 +394,23 @@ Test.prototype._assert = function assert(ok, opts) {
394
394
}
395
395
} ;
396
396
397
- Test . prototype . fail = function ( msg , extra ) {
397
+ Test . prototype . fail = function fail ( msg , extra ) {
398
398
this . _assert ( false , {
399
399
message : msg ,
400
400
operator : 'fail' ,
401
401
extra : extra
402
402
} ) ;
403
403
} ;
404
404
405
- Test . prototype . pass = function ( msg , extra ) {
405
+ Test . prototype . pass = function pass ( msg , extra ) {
406
406
this . _assert ( true , {
407
407
message : msg ,
408
408
operator : 'pass' ,
409
409
extra : extra
410
410
} ) ;
411
411
} ;
412
412
413
- Test . prototype . skip = function ( msg , extra ) {
413
+ Test . prototype . skip = function skip ( msg , extra ) {
414
414
this . _assert ( true , {
415
415
message : msg ,
416
416
operator : 'skip' ,
@@ -676,7 +676,7 @@ Test.prototype['throws'] = function (fn, expected, msg, extra) {
676
676
} ) ;
677
677
} ;
678
678
679
- Test . prototype . doesNotThrow = function ( fn , expected , msg , extra ) {
679
+ Test . prototype . doesNotThrow = function doesNotThrow ( fn , expected , msg , extra ) {
680
680
if ( typeof expected === 'string' ) {
681
681
msg = expected ;
682
682
expected = undefined ;
@@ -741,7 +741,7 @@ Test.prototype.doesNotMatch = function doesNotMatch(string, regexp, msg, extra)
741
741
} ) ;
742
742
} ;
743
743
744
- Test . skip = function ( name_ , _opts , _cb ) {
744
+ Test . skip = function skip ( name_ , _opts , _cb ) {
745
745
var args = getTestArgs . apply ( null , arguments ) ;
746
746
args . opts . skip = true ;
747
747
return Test ( args . name , args . opts , args . cb ) ;
0 commit comments