mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-03 18:48:12 +08:00
test: puppeteer auto close
This commit is contained in:
@@ -18,10 +18,10 @@ module.exports = async () => {
|
||||
browser = await puppeteer.launch(options);
|
||||
}
|
||||
setTimeout(async () => {
|
||||
if ((await browser.process()).signalCode) {
|
||||
if ((await browser.process()).exitCode === null) {
|
||||
browser.close();
|
||||
}
|
||||
}, 5000);
|
||||
}, 10000);
|
||||
|
||||
return browser;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user