mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: puppeteer.connect with using disconnects the browser (#12371)
This commit is contained in:
@@ -424,12 +424,18 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
||||
|
||||
/** @internal */
|
||||
[disposeSymbol](): void {
|
||||
return void this.close().catch(debugError);
|
||||
if (this.process()) {
|
||||
return void this.close().catch(debugError);
|
||||
}
|
||||
return void this.disconnect().catch(debugError);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
[asyncDisposeSymbol](): Promise<void> {
|
||||
return this.close();
|
||||
if (this.process()) {
|
||||
return this.close();
|
||||
}
|
||||
return this.disconnect();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -197,7 +197,7 @@ export class TestServer {
|
||||
this.#requestSubscribers.clear();
|
||||
for (const request of this.#requests.values()) {
|
||||
if (!request.writableEnded) {
|
||||
request.end();
|
||||
request.destroy();
|
||||
}
|
||||
}
|
||||
this.#requests.clear();
|
||||
|
||||
Reference in New Issue
Block a user