File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1- const os = require ( 'os' ) ;
1+ const path = require ( 'path' ) ;
2+ const process = require ( 'process' ) ;
23
34const _ = require ( 'lodash' ) ;
5+ const resolveFrom = require ( 'resolve-from' ) ;
46
57const log = require ( '../utils/logger' ) ;
68
@@ -122,10 +124,10 @@ function hasEmptyPositionalArgs(value, key) {
122124 * @param {Detox.DetoxTestRunnerConfig } config
123125 */
124126function inspectBrkHookDefault ( config ) {
125- /* istanbul ignore next */
126- config . args . $0 = os . platform ( ) !== 'win32'
127- ? `node --inspect-brk ./node_modules/.bin/jest`
128- : `node --inspect-brk ./node_modules/jest/ bin/jest.js ` ;
127+ const cwd = process . cwd ( ) ;
128+ const binAbsolute = resolveFrom ( cwd , 'jest/bin/jest' ) ;
129+ const bin = path . relative ( cwd , binAbsolute ) ;
130+ config . args . $0 = `node --inspect-brk ${ bin } ` ;
129131 config . args . runInBand = true ;
130132 delete config . args . w ;
131133 delete config . args . workers ;
You can’t perform that action at this time.
0 commit comments