()
| 13 | export const WS_FILE = path.join(WS_DIR, 'wsEndpoint'); |
| 14 | |
| 15 | export default async function globalSetup() { |
| 16 | const browser = await puppeteer.launch({ |
| 17 | headless: process.env.HEADLESS !== 'false', |
| 18 | args: [ |
| 19 | '--no-sandbox', |
| 20 | '--disable-setuid-sandbox', |
| 21 | '--disable-dev-shm-usage', |
| 22 | '--disable-accelerated-2d-canvas', |
| 23 | '--no-first-run', |
| 24 | '--no-zygote', |
| 25 | '--disable-gpu' |
| 26 | ], |
| 27 | dumpio: process.env.DEBUG === 'true' |
| 28 | }); |
| 29 | // Visible to globalTeardown via the global object, not to the test workers. |
| 30 | global.__MV_BROWSER__ = browser; |
| 31 | await mkdir(WS_DIR, {recursive: true}); |
| 32 | await writeFile(WS_FILE, browser.wsEndpoint()); |
| 33 | } |
nothing calls this directly
no outgoing calls
no test coverage detected