File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ const Promise = require('bluebird')
55const log = require ( '../logger' ) . create ( 'launcher' )
66const helper = require ( '../helper' )
77
8- const BEING_CAPTURED = 1
9- const CAPTURED = 2
10- const BEING_KILLED = 3
11- const FINISHED = 4
12- const RESTARTING = 5
13- const BEING_FORCE_KILLED = 6
8+ const BEING_CAPTURED = 'BEING_CAPTURED'
9+ const CAPTURED = 'CAPTURED'
10+ const BEING_KILLED = 'BEING_KILLED'
11+ const FINISHED = 'FINISHED'
12+ const RESTARTING = 'RESTARTING'
13+ const BEING_FORCE_KILLED = 'BEING_FORCE_KILLED'
1414
1515/**
1616 * Base launcher that any custom launcher extends.
@@ -29,7 +29,17 @@ function BaseLauncher (id, emitter) {
2929 this . emitAsync = KarmaEventEmitter . prototype . emitAsync . bind ( this )
3030
3131 this . id = id
32- this . state = null
32+ this . _state = null
33+ Object . defineProperty ( this , 'state' , {
34+ get : ( ) => {
35+ return this . _state
36+ } ,
37+ set : ( toState ) => {
38+ log . debug ( `${ this . _state } -> ${ toState } ` )
39+ this . _state = toState
40+ }
41+ } )
42+
3343 this . error = null
3444
3545 let killingPromise
You can’t perform that action at this time.
0 commit comments