How to use the jest-environment-puppeteer.teardown function in jest-environment-puppeteer

To help you get started, we’ve selected a few jest-environment-puppeteer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ipfs-shipyard / ipfs-webui / test / e2e / setup / global-teardown.js View on Github external
module.exports = async function globalTeardown (globalConfig) {
  const teardown = []
  // custom teardown
  const ipfsd = global.__IPFSD__
  if (ipfsd) teardown.push(ipfsd.stop())
  // continue with global teardown
  teardown.push(teardownDevServer())
  teardown.push(teardownPuppeteer(globalConfig))
  await Promise.all(teardown)
}
github gidztech / jest-puppeteer-docker / src / teardown.js View on Github external
module.exports = async function globalTeardown(jestConfig) {
    await teardownPuppeteer(jestConfig);

    // shut down Docker container
    await dockerShutdownChromium();

    // delete websocket from file for next time we run test suites
    const endpointPath = path.join(__dirname, '../', 'wsEndpoint');
    fs.writeFileSync(endpointPath, '', { encoding: 'utf8' });
};
github ifiokjr / remirror / support / jest / puppeteer.ts View on Github external
export async function destroyServer(globalConfig: Config.GlobalConfig) {
  serverSetupPromise = undefined;
  await teardown();
  await teardownPuppeteer(globalConfig);
}
github ifiokjr / remirror / e2e / puppeteer.ts View on Github external
export const destroyServer = async (globalConfig?: Config.GlobalConfig) => {
  serverSetupPromise = undefined;
  await teardown();
  await teardownPuppeteer(globalConfig);
};

jest-environment-puppeteer

Puppeteer environment for Jest.

MIT
Latest version published 1 day ago

Package Health Score

88 / 100
Full package analysis

Popular jest-environment-puppeteer functions