Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/browser-pool/src/puppeteer/puppeteer-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class PuppeteerPlugin extends BrowserPlugin<
'version',
'on',
'process',
'pages',
] as const
).reduce((map, method) => {
map[method] = browser[method as 'close']?.bind(browser);
Expand Down
12 changes: 12 additions & 0 deletions test/browser-pool/browser-plugins/plugins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,18 @@ describe('Plugins', () => {
}
});

test.concurrent('should allow calling functions on the proxied browser', async () => {
const plugin = new PuppeteerPlugin(puppeteer);
const launchContext = plugin.createLaunchContext();
const browser = await plugin.launch(launchContext);

try {
await expect(browser.pages()).resolves.toBeDefined();
} finally {
await browser.close();
}
});

test.concurrent('should pass launch options to browser', async () => {
const plugin = new PuppeteerPlugin(puppeteer);

Expand Down
Loading