Files
gas-react-sheets/test/global-teardown.js
T
Yaroslav Serhieiev 96ad8afe1d build: fix eslint issues (#124)
* build: fix eslint issues

* build: migrate to Node 16
2022-04-12 00:36:59 -04:00

17 lines
544 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.
const fs = require('fs').promises;
const os = require('os');
const path = require('path');
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
module.exports = async function globalTeardown() {
// close the browser instance
await global.__BROWSER_GLOBAL__.close();
// clean-up the wsEndpoint file
await fs.rmdir(DIR, { recursive: true, force: true });
};