Skip to content

Commit

Permalink
docs: improve custom puppeteer example to prevent worker warnings (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
falsyvalues authored Jan 1, 2023
1 parent 605da1e commit e9f0d03
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
### Chore & Maintenance

- `[@jest/fake-timers]` Update `@sinonjs/fake-timers` ([#13612](https://github.com/facebook/jest/pull/13612))
- `[docs]` Improve custom puppeteer example to prevent worker warnings ([#13619](https://github.com/facebook/jest/pull/13619))

### Performance

Expand Down
3 changes: 3 additions & 0 deletions docs/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-25.x/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-26.x/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-27.x/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-28.x/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-29.0/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-29.1/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-29.2/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-29.3/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class PuppeteerEnvironment extends NodeEnvironment {
}

async teardown() {
if (this.global.__BROWSER_GLOBAL__) {
this.global.__BROWSER_GLOBAL__.disconnect();
}
await super.teardown();
}

Expand Down

0 comments on commit e9f0d03

Please sign in to comment.