85223ca42a
- Update missing dev dependencies - Fix root .eslintrc.json and client and server versions - Add lint.yaml workflow - Remove babel settings - Clean up and fix eslint and ts errors
19 lines
558 B
JavaScript
19 lines
558 B
JavaScript
// Use custom jest puppeteer preset as described here:
|
|
// jestjs.io/docs/puppeteer#custom-example-without-jest-puppeteer-preset
|
|
// This allows using stealth mode.
|
|
|
|
import fs from 'fs';
|
|
import os from 'os';
|
|
import path from 'path';
|
|
|
|
const fsPromises = fs.promises;
|
|
|
|
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
|
|
export default async function globalTeardown() {
|
|
// close the browser instance
|
|
await global.__BROWSER_GLOBAL__.close();
|
|
|
|
// clean-up the wsEndpoint file
|
|
await fsPromises.rmdir(DIR, { recursive: true, force: true });
|
|
}
|