chore: add rimraf for browsers (#9847)

This commit is contained in:
Alex Rudenko 2023-03-14 13:46:57 +01:00 committed by GitHub
parent 1a1e79d046
commit 850d1aaa19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 5 deletions

2
package-lock.json generated
View File

@ -9130,6 +9130,7 @@
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"rimraf": "4.4.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"
@ -10087,6 +10088,7 @@
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"rimraf": "4.4.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"

View File

@ -75,6 +75,7 @@
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"rimraf": "4.4.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"

View File

@ -19,6 +19,8 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
import rimraf from 'rimraf';
import {CLI} from '../../lib/cjs/CLI.js';
import {testChromeBuildId, testFirefoxBuildId} from './versions.js';
@ -33,7 +35,7 @@ describe('CLI', function () {
});
afterEach(() => {
fs.rmSync(tmpDir, {recursive: true});
rimraf.sync(tmpDir);
});
it('should download Chromium binaries', async () => {

View File

@ -21,6 +21,8 @@ import https from 'https';
import os from 'os';
import path from 'path';
import rimraf from 'rimraf';
import {fetch, canFetch, Browser, BrowserPlatform} from '../../lib/cjs/main.js';
import {testChromeBuildId, testFirefoxBuildId} from './versions.js';
@ -37,7 +39,7 @@ describe('fetch', () => {
});
afterEach(() => {
fs.rmSync(tmpDir, {recursive: true});
rimraf.sync(tmpDir);
});
it('should check if a buildId can be downloaded', async () => {

View File

@ -19,6 +19,8 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
import rimraf from 'rimraf';
import {BrowserPlatform} from '../../lib/cjs/browsers/browsers.js';
import {
createProfile,
@ -83,7 +85,7 @@ describe('Firefox', () => {
});
afterEach(() => {
fs.rmSync(tmpDir, {recursive: true});
rimraf.sync(tmpDir);
});
it('should create a profile', async () => {

View File

@ -19,6 +19,8 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
import rimraf from 'rimraf';
import {
CDP_WEBSOCKET_ENDPOINT_REGEX,
computeExecutablePath,
@ -84,7 +86,7 @@ describe('launcher', () => {
});
afterEach(() => {
fs.rmSync(tmpDir, {recursive: true});
rimraf.sync(tmpDir);
});
it('should launch a Chrome browser', async () => {
@ -144,7 +146,7 @@ describe('launcher', () => {
});
afterEach(() => {
fs.rmSync(tmpDir, {recursive: true});
rimraf.sync(tmpDir);
});
it('should launch a Firefox browser', async () => {