2021-05-13 16:13:57 -05:00
|
|
|
/* eslint-disable no-console */
|
|
|
|
|
2018-02-08 16:24:34 -05:00
|
|
|
const os = require('os');
|
|
|
|
const path = require('path');
|
2021-05-13 16:13:57 -05:00
|
|
|
const { green } = require('kleur');
|
|
|
|
const rimraf = require('rimraf');
|
2018-02-08 16:24:34 -05:00
|
|
|
|
|
|
|
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
|
|
|
|
|
2022-01-09 14:51:50 -05:00
|
|
|
module.exports = async function () {
|
2019-04-29 01:44:29 -05:00
|
|
|
console.log(green('Teardown Puppeteer'));
|
2018-02-08 16:24:34 -05:00
|
|
|
await global.__BROWSER__.close();
|
2022-01-09 14:51:50 -05:00
|
|
|
rimraf.sync(DIR);
|
2018-02-08 16:24:34 -05:00
|
|
|
};
|