Skip to content

Commit

Permalink
test: update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jan 23, 2024
1 parent fead975 commit 017dd9d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/helpers/run-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ function runBrowser(config) {
page = newPage;
page.emulate(options);

return page.setRequestInterception(true);
})
.then(() => {
page.on("request", (interceptedRequest) => {
if (interceptedRequest.isInterceptResolutionHandled()) return;
if (interceptedRequest.url().includes("favicon.ico")) {
interceptedRequest.respond({
status: 200,
contentType: "image/png",
body: "Empty",
});
} else {
interceptedRequest.continue();
}
});

resolve({ page, browser });
})
.catch(reject);
Expand Down

0 comments on commit 017dd9d

Please sign in to comment.