Skip to content

Commit 017dd9d

Browse files
test: update logic
1 parent fead975 commit 017dd9d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/helpers/run-browser.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ function runBrowser(config) {
5050
page = newPage;
5151
page.emulate(options);
5252

53+
return page.setRequestInterception(true);
54+
})
55+
.then(() => {
56+
page.on("request", (interceptedRequest) => {
57+
if (interceptedRequest.isInterceptResolutionHandled()) return;
58+
if (interceptedRequest.url().includes("favicon.ico")) {
59+
interceptedRequest.respond({
60+
status: 200,
61+
contentType: "image/png",
62+
body: "Empty",
63+
});
64+
} else {
65+
interceptedRequest.continue();
66+
}
67+
});
68+
5369
resolve({ page, browser });
5470
})
5571
.catch(reject);

0 commit comments

Comments
 (0)