nl_tokens: ////////////////////////////////////////////////////////////////////////// Public methods ///////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// MochaRunner . start () - > Object
pl_tokens: function ( ) { var self = this ; return new Promise ( function ( resolve , reject ) { self . mocha = new Mocha ( { ui : 'bdd' , reporter : path . join ( __dirname , '../reporters/mocha_worker_reporter' ) , slow : process . env . WORKER_SLOW || self . SLOW , timeout : process . env . WORKER_TIMEOUT || self . TIMEOUT , bail : true } ) ; self . mocha . addFile ( process . env . WORKER_TEST ) ; self . runner = self . mocha . run ( function ( failures ) { resolve ( ) ; } ) ; self . runner . on ( 'suite' , function ( suite ) { self . totalTests = suite . total ; } ) ; self . runner . on ( 'test end' , function ( ) { self . testsFinished ++ ; self . checkMemory ( ) ; } ) ; self . runner . on ( 'fail' , function ( ) { self . hasFailingTest = <mask> ; } ) ; self . runner . on ( 'end' , function ( ) { self . checkFinishedTests ( ) ; self . checkTestCount ( ) ; self . checkMemory ( ) ; process . send ( { type : 'suiteDone' , data : process . env . WORKER_TEST } ) ; cluster . worker . kill ( 0 ) ; } ) ; } ) ; }