mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 22:08:02 +00:00
Unhandled promise rejection terminates Node.js process with non-zero exit code.
This commit is contained in:
parent
a33afbef1b
commit
679f725e02
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,11 @@
|
||||||
const playwright = require("playwright");
|
const playwright = require("playwright");
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
// NOTE: Unhandled promise rejection terminates Node.js process with non-zero exit code.
|
||||||
|
process.on("unhandledRejection", (event) => {
|
||||||
|
throw event;
|
||||||
|
});
|
||||||
|
|
||||||
for (const browserType of ["chromium", "firefox", "webkit"]) {
|
for (const browserType of ["chromium", "firefox", "webkit"]) {
|
||||||
const browser = await playwright[browserType].launch();
|
const browser = await playwright[browserType].launch();
|
||||||
const context = await browser.newContext();
|
const context = await browser.newContext();
|
||||||
|
|
Loading…
Add table
Reference in a new issue