mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-24 10:58:52 +01:00
14 lines
358 B
JavaScript
14 lines
358 B
JavaScript
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 () => {
|
|
// close the browser instance
|
|
await global.__BROWSER_GLOBAL__.close();
|
|
|
|
// clean-up the wsEndpoint file
|
|
await fs.rm(DIR, { recursive: true, force: true });
|
|
};
|