Implement e2e tests

This commit is contained in:
Reinier Criel 2025-10-23 11:41:13 -07:00
parent f817bf887a
commit 059cba06bc
17 changed files with 163 additions and 293 deletions

View file

@ -2,13 +2,7 @@ import { ui } from "../../environment/userInteraction.js";
import { safeSpawn } from "../../utils/safeSpawn.js";
import { mergeSafeChainProxyEnvironmentVariables } from "../../registryProxy/registryProxy.js";
/**
* Runs a pip command with the specified arguments
*
* @param {string} command - The pip command to use (e.g., "pip", "pip3")
* @param {string[]} args - Command arguments
* @returns {Promise<{status: number}>} Result object with status code
*/
export async function runPip(command, args) {
try {
const result = await safeSpawn(command, args, {
@ -26,18 +20,10 @@ export async function runPip(command, args) {
}
}
/**
* Runs a pip command in dry-run mode and captures output
* Note: pip doesn't have a native --dry-run flag, so this may need adjustment
*
* @param {string} command - The pip command to use
* @param {string[]} args - Command arguments
* @returns {Promise<{status: number, output: string}>} Result with status and output
*/
export async function dryRunPipCommandAndOutput(command, args) {
try {
// Note: pip doesn't have a --dry-run flag like npm
// This would need to be implemented differently if dry-run functionality is needed
// Note: pip supports --dry-run for the "install" command only; "download" and "wheel" do not.
// We don't mutate args here — callers should include --dry-run when appropriate.
const result = await safeSpawn(
command,
args,