Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix: args overwrite (#240)
Browse files Browse the repository at this point in the history
* fix: args overwrite

* fix order

* update args
  • Loading branch information
Lykhoyda committed Jan 12, 2023
1 parent 18c8232 commit 0a8d442
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/setup/playwright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export async function launchPlaywright(
browser = await (
await import("playwright")
).chromium.launchPersistentContext(tmpdir, {
...(options.playwrightOptions ?? {}),
headless: options.playwrightOptions?.headless,
args: [
`--disable-extensions-except=${metamaskPath}`,
`--load-extension=${metamaskPath}`,
...(options.playwrightOptions?.args || []),
`${options.puppeteerOptions?.headless ? "--headless=chrome" : ""}`,
...(options.puppeteerOptions?.headless ? ["--headless=chrome"] : []),
],
...(options.playwrightOptions ?? {}),
});
}
const { DPlaywrightBrowser } = await import("../playwright");
Expand Down
4 changes: 2 additions & 2 deletions src/setup/puppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export async function launchPuppeteer(
const pBrowser = await (
await import("puppeteer")
).default.launch({
...(options.puppeteerOptions ?? {}),
headless: options.puppeteerOptions?.headless,
args: [
`--disable-extensions-except=${metamaskPath}`,
`--load-extension=${metamaskPath}`,
...(options.puppeteerOptions?.args || []),
`${options.puppeteerOptions?.headless ? "--headless=chrome" : ""}`,
...(options.puppeteerOptions?.headless ? ["--headless=chrome"] : []),
],
...(options.puppeteerOptions ?? {}),
});
const { DPuppeteerBrowser } = await import("../puppeteer");
return new DPuppeteerBrowser(pBrowser, options.metaMaskFlask);
Expand Down

0 comments on commit 0a8d442

Please sign in to comment.