e2ed
Version:
E2E testing framework over Playwright
26 lines (24 loc) • 992 B
JavaScript
;
/* eslint-disable no-console */
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const node_child_process_1 = require("node:child_process");
const package_json_1 = __importDefault(require("../package.json"));
const playwrightVersion = package_json_1.default.dependencies['@playwright/test'];
const chromiumPackage = `@playwright/browser-chromium@${playwrightVersion}`;
console.log(`Install ${chromiumPackage}`);
const installation = (0, node_child_process_1.spawn)('npm', ['install', '--global', chromiumPackage], {
shell: true,
stdio: 'inherit',
});
installation.on('close', (code) => {
if (code === 0) {
console.log(`${chromiumPackage} has been installed successfully`);
}
else {
console.log(`Installation of ${chromiumPackage} failed with code ${code}`);
}
});