mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
69d7df20d8
* chore: enable pnp yarn * chore: ignore pnp * fix type issues on run eslint * add missing dependency and fix some errors * fix most of the errors some were just disabled, already fixed in master * add missing jest-config * update jest@26 align with other deps * add missing @babel/register * clean up * use yarn node * use yarn node on release * chore: add husky 6 * chore: add husky 6 * chore: lint-stage * chore: test * chore: add hook git * chore: test * chore: test * update deps * chore: fix commit lint * fix docker run * update git ignore
17 lines
610 B
JavaScript
17 lines
610 B
JavaScript
const fs = require('fs');
|
|
const os = require('os');
|
|
const path = require('path');
|
|
const { green } = require('kleur');
|
|
const puppeteer = require('puppeteer');
|
|
const mkdirp = require('mkdirp');
|
|
|
|
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
|
|
|
|
module.exports = async function() {
|
|
// eslint-disable-next-line no-console
|
|
console.log(green('Setup Puppeteer'));
|
|
const browser = await puppeteer.launch({ headless: true, /* slowMo: 300 */ args: ['--no-sandbox'] });
|
|
global.__BROWSER__ = browser;
|
|
mkdirp.sync(DIR);
|
|
fs.writeFileSync(path.join(DIR, 'wsEndpoint'), browser.wsEndpoint());
|
|
};
|