jest-puppeteer icon indicating copy to clipboard operation
jest-puppeteer copied to clipboard

jestPuppeteer.resetBrowser() does not clear down service workers

Open benjaminkay93 opened this issue 5 years ago • 0 comments

🐛 Bug Report

jestPuppeteer.resetBrowser() does not seem to destroy any running service workers.

To Reproduce

Steps to reproduce the behavior:

  1. Setup a file to
beforeEach(async () => {
  await jestPuppeteer.resetPage();
  await jestPuppeteer.resetBrowser();
});
  1. Install a service worker in one test.
  2. In another test, using page.evaluate you can assert a service worker has been installed.

Expected behavior

I would expect resetBrowser to destroy all running and active service workers.

Link to repl or repo (highly encouraged)

If this is needed to add more context, I can do this. It feels more feature request now i think about it than bug 😄

Run npx envinfo --system --binaries --npmPackages expect-puppeteer,jest-dev-server,jest-environment-puppeteer,jest-puppeteer,spawnd --markdown --clipboard

Paste the results here:

## System:
 - OS: macOS 10.14.6
 - CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
 - Memory: 286.91 MB / 8.00 GB
 - Shell: 5.3 - /bin/zsh
## Binaries:
 - Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
 - Yarn: 1.15.2 - ~/.nvm/versions/node/v10.15.0/bin/yarn
 - npm: 6.9.0 - ~/.nvm/versions/node/v10.15.0/bin/npm

benjaminkay93 avatar Sep 16 '19 13:09 benjaminkay93