11"use strict" ;
22var path_1 = require ( 'path' ) ;
33var child_process_1 = require ( 'child_process' ) ;
4- var mocha_1 = require ( './paths/mocha' ) ;
4+ var constants_1 = require ( '../constants' ) ;
5+ var runner_1 = require ( './paths/runner' ) ;
56var node_1 = require ( './paths/node' ) ;
6- var reporterPath = path_1 . join ( __dirname , '..' , 'reporter' , 'index.js' ) ;
77var node = node_1 . default ( ) ;
8- var mocha = mocha_1 . default ( ) ;
8+ var runner = runner_1 . default ( ) ;
99function spawnRunnerProcess ( _a ) {
1010 var dir = _a . dir , taskPosition = _a . taskPosition , testPath = _a . testPath ;
1111 var options = {
@@ -20,16 +20,9 @@ function spawnRunnerProcess(_a) {
2020 TASK_POSITION : taskPosition ,
2121 NODE_PATH : path_1 . join ( dir , 'node_modules' ) ,
2222 } ) ;
23- return child_process_1 . spawn ( node , [
24- mocha ,
25- '--bail' ,
26- '--harmony' ,
27- '--no-colors' ,
28- '--timeout=3000' ,
29- '--compilers js:babel-register' ,
30- ( "--reporter=" + reporterPath ) ,
31- testPath ,
32- ] , options ) ;
23+ return child_process_1 . spawn ( node , [ runner ]
24+ . concat ( constants_1 . runnerOptions )
25+ . concat ( testPath ) , options ) ;
3326}
3427Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3528exports . default = spawnRunnerProcess ;
0 commit comments