mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: do not exit UI mode upon page reload (#30135)
This commit is contained in:
parent
aeb403f851
commit
d7710f0c3e
@ -229,7 +229,6 @@ class StdinServer implements Transport {
|
||||
}
|
||||
|
||||
onclose() {
|
||||
gracefullyProcessExitDoNotHang(0);
|
||||
}
|
||||
|
||||
sendEvent?: (method: string, params: any) => void;
|
||||
|
||||
@ -98,7 +98,7 @@ class TestServerDispatcher implements TestServerInterface {
|
||||
this._configFile = configFile;
|
||||
this.transport = {
|
||||
dispatch: (method, params) => (this as any)[method](params),
|
||||
onclose: () => gracefullyProcessExitDoNotHang(0),
|
||||
onclose: () => {},
|
||||
};
|
||||
this._globalWatcher = new Watcher('deep', () => this._dispatchEvent('listChanged', {}));
|
||||
this._testWatcher = new Watcher('flat', events => {
|
||||
@ -392,6 +392,7 @@ async function innerRunTestServer(configFile: string | undefined, options: { hos
|
||||
const testServer = new TestServer(configFile);
|
||||
const cancelPromise = new ManualPromise<void>();
|
||||
const sigintWatcher = new SigIntWatcher();
|
||||
process.stdin.on('close', () => gracefullyProcessExitDoNotHang(0));
|
||||
void sigintWatcher.promise().then(() => cancelPromise.resolve());
|
||||
try {
|
||||
const server = await testServer.start(options);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user