mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(browser): ensure first page is created when browser is launched (#2658)
It's impossible to launch chromium without initial page. This patch makes sure that `puppeteer.launch()` always returns a browser with at least one page user can connect to.
This commit is contained in:
@@ -218,6 +218,7 @@ module.exports.addTests = function({testRunner, expect, PROJECT_ROOT, defaultBro
|
||||
it('should support the pipe option', async() => {
|
||||
const options = Object.assign({pipe: true}, defaultBrowserOptions);
|
||||
const browser = await puppeteer.launch(options);
|
||||
expect((await browser.pages()).length).toBe(1);
|
||||
expect(browser.wsEndpoint()).toBe('');
|
||||
const page = await browser.newPage();
|
||||
expect(await page.evaluate('11 * 11')).toBe(121);
|
||||
|
||||
Reference in New Issue
Block a user