Skip to content

Commit

Permalink
Merge pull request #100 from pwa-builder/dev
Browse files Browse the repository at this point in the history
remove optimizations from other calls
  • Loading branch information
khmyznikov authored Dec 14, 2023
2 parents b624c0a + 1762114 commit 9b1f804
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
11 changes: 6 additions & 5 deletions FindServiceWorker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ const httpTrigger: AzureFunction = async function (

try {
page.on('request', (req) => {
if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){
req.abort();
}
else {
// commented because it doesn't work on Azure environment
// if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){
// req.abort();
// }
// else {
req.continue();
}
// }
});

try {
Expand Down
11 changes: 6 additions & 5 deletions FindWebManifest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,13 @@ async function puppeteerAttempt(site: string, context?: Context): Promise<{error
try {
// speed up loading
page.on('request', (req) => {
if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){
req.abort();
}
else {
// commented because it doesn't work on Azure environment
// if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){
// req.abort();
// }
// else {
req.continue();
}
// }
});

// waiting for manifest request or until full page loads
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineConfig({
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 1 : 0,
retries: process.env.CI ? 2 : 2,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
Expand Down

0 comments on commit 9b1f804

Please sign in to comment.