Files
gas-react-sheets/test/global-teardown.js
T
Elisha Nuchi 85223ca42a Chore: Update eslint configuration (#224)
- 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
2024-06-02 18:01:12 -04:00

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 });
}