File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ const { Transport } = require('../../lib/rpc/transport');
25
25
const { PlaywrightDispatcher } = require ( '../../lib/rpc/server/playwrightDispatcher' ) ;
26
26
const { setUseApiName } = require ( '../../lib/progress' ) ;
27
27
28
+ const browserName = process . env . BROWSER || 'chromium' ;
29
+
28
30
module . exports = function registerFixtures ( global ) {
29
31
global . registerWorkerFixture ( 'parallelIndex' , async ( { } , test ) => {
30
32
await test ( process . env . JEST_WORKER_ID - 1 ) ;
@@ -58,10 +60,20 @@ module.exports = function registerFixtures(global) {
58
60
} ) ;
59
61
60
62
global . registerWorkerFixture ( 'defaultBrowserOptions' , async ( { } , test ) => {
63
+ let executablePath = undefined ;
64
+ if ( browserName === 'chromium' && process . env . CRPATH )
65
+ executablePath = process . env . CRPATH ;
66
+ if ( browserName === 'firefox' && process . env . FFPATH )
67
+ executablePath = process . env . FFPATH ;
68
+ if ( browserName === 'webkit' && process . env . WKPATH )
69
+ executablePath = process . env . WKPATH ;
70
+ if ( executablePath )
71
+ console . error ( `Using executable at ${ executablePath } ` ) ;
61
72
await test ( {
62
73
handleSIGINT : false ,
63
74
slowMo : valueFromEnv ( 'SLOW_MO' , 0 ) ,
64
75
headless : ! ! valueFromEnv ( 'HEADLESS' , true ) ,
76
+ executablePath
65
77
} ) ;
66
78
} ) ;
67
79
You can’t perform that action at this time.
0 commit comments