mirror of
https://github.com/usebruno/bruno.git
synced 2025-05-05 15:32:58 +00:00
18 lines
537 B
JavaScript
18 lines
537 B
JavaScript
const path = require('path');
|
|
const timer = require('node:timers/promises');
|
|
const { _electron: electron } = require('playwright');
|
|
|
|
const electronAppPath = path.join(__dirname, '../packages/bruno-electron');
|
|
|
|
(async () => {
|
|
const browser = await electron.launch({ args: [electronAppPath] });
|
|
const context = await browser.context();
|
|
await context.route('**/*', (route) => route.continue());
|
|
|
|
while (true) {
|
|
if(browser.windows().length) break;
|
|
await timer.setTimeout(200);
|
|
}
|
|
await browser.windows()[0].pause();
|
|
})();
|