puppeteer/test/installation/assets/puppeteer/installCanary.js
2024-01-03 10:11:33 +00:00

25 lines
429 B
JavaScript

/**
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import {
Browser,
detectBrowserPlatform,
install,
resolveBuildId,
} from '@puppeteer/browsers';
(async () => {
await install({
cacheDir: process.env['PUPPETEER_CACHE_DIR'],
browser: Browser.CHROME,
buildId: await resolveBuildId(
Browser.CHROME,
detectBrowserPlatform(),
'canary'
),
});
})();