mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: download chrome-headless-shell by default and use it for the old headless mode (#11093)
This commit is contained in:
@@ -40,8 +40,9 @@ describe('`puppeteer` with configuration', () => {
|
||||
|
||||
it('evaluates', async function () {
|
||||
const files = await readdir(join(this.sandbox, '.cache', 'puppeteer'));
|
||||
assert.equal(files.length, 1);
|
||||
assert.equal(files[0], 'chrome');
|
||||
assert.equal(files.length, 2);
|
||||
assert(files.includes('chrome'));
|
||||
assert(files.includes('chrome-headless-shell'));
|
||||
|
||||
const script = await readAsset('puppeteer', 'basic.js');
|
||||
await this.runScript(script, 'mjs');
|
||||
@@ -71,8 +72,9 @@ describe('`puppeteer` with configuration', () => {
|
||||
|
||||
it('evaluates', async function () {
|
||||
const files = await readdir(join(this.sandbox, '.cache', 'puppeteer'));
|
||||
assert.equal(files.length, 1);
|
||||
assert.equal(files[0], 'chrome');
|
||||
assert.equal(files.length, 2);
|
||||
assert(files.includes('chrome'));
|
||||
assert(files.includes('chrome-headless-shell'));
|
||||
|
||||
const script = await readAsset('puppeteer', 'basic.js');
|
||||
await this.runScript(script, 'mjs');
|
||||
|
||||
@@ -35,8 +35,10 @@ describe('`puppeteer`', () => {
|
||||
|
||||
it('evaluates CommonJS', async function () {
|
||||
const files = await readdir(join(this.sandbox, '.cache', 'puppeteer'));
|
||||
assert.equal(files.length, 1);
|
||||
assert.equal(files[0], 'chrome');
|
||||
assert.equal(files.length, 2);
|
||||
assert(files.includes('chrome'));
|
||||
assert(files.includes('chrome-headless-shell'));
|
||||
|
||||
const script = await readAsset('puppeteer-core', 'requires.cjs');
|
||||
await this.runScript(script, 'cjs');
|
||||
});
|
||||
@@ -62,8 +64,9 @@ describe('`puppeteer`', () => {
|
||||
|
||||
it('evaluates', async function () {
|
||||
const files = await readdir(join(this.sandbox, '.cache', 'puppeteer'));
|
||||
assert.equal(files.length, 1);
|
||||
assert.equal(files[0], 'chrome');
|
||||
assert.equal(files.length, 2);
|
||||
assert(files.includes('chrome'));
|
||||
assert(files.includes('chrome-headless-shell'));
|
||||
|
||||
const script = await readAsset('puppeteer', 'basic.js');
|
||||
await this.runScript(script, 'mjs');
|
||||
|
||||
Reference in New Issue
Block a user