MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / globalSetup

Function globalSetup

test/integration/setup/global-setup.js:15–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13export const WS_FILE = path.join(WS_DIR, 'wsEndpoint');
14
15export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected