mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-08-13 15:00:49 -04:00
download Chromium only when tests are run
This commit is contained in:
parent
ec141ff76d
commit
fdd02a6bd6
5 changed files with 33 additions and 7 deletions
test/integration
|
@ -1,8 +1,10 @@
|
|||
/* global vm, render, Promise */
|
||||
const puppeteer = require('puppeteer');
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const test = require('tap').test;
|
||||
const path = require('path');
|
||||
|
||||
const downloadChromium = require('../helper/download-chromium');
|
||||
|
||||
const indexHTML = path.resolve(__dirname, 'index.html');
|
||||
const testDir = (...args) => path.resolve(__dirname, 'pick-tests', ...args);
|
||||
|
||||
|
@ -19,6 +21,7 @@ const runFile = async (file, action, page, script) => {
|
|||
|
||||
// immediately invoked async function to let us wait for each test to finish before starting the next.
|
||||
(async () => {
|
||||
await downloadChromium();
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue