Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit c1f2ba2

Browse files
author
Akim Mamedov
committed
Add browser logs
1 parent 36c7619 commit c1f2ba2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/@tests/smoke/web-cra-ts/test/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const test = async () => {
2626
console.log("starting puppeteer...");
2727
const browser = await puppeteer.launch();
2828
const page = (await browser.pages())[0];
29+
page.on("console", (message) =>
30+
console.log(`${message.type().toUpperCase()}: ${message.text()}`),
31+
);
2932

3033
// uncomment to debug what's happening inside the browser
3134
// page.on('console', (msg) => console.log('// from console: ', msg.text()));

packages/@tests/smoke/web/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ const test = async () => {
4444
console.log("starting puppeteer...");
4545
const browser = await puppeteer.launch();
4646
const page = (await browser.pages())[0];
47+
page.on("console", (message) => {
48+
console.log(`${message.type().toUpperCase()}: ${message.text()}`);
49+
});
4750

4851
// uncomment to debug what's happening inside the browser
4952
// page.on('console', (msg) => console.log('// from console: ', msg.text()));

0 commit comments

Comments
 (0)