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

@ -1,20 +1,7 @@
/**
* Pip command constants
*
* Note: Unlike npm, pip does not support command aliases or abbreviations.
* Commands must be spelled out fully (e.g., "install", not "i" or "add").
*/
export const pipInstallCommand = "install";
export const pipDownloadCommand = "download";
export const pipWheelCommand = "wheel";
export const pipUninstallCommand = "uninstall";
/**
* Gets the pip command from the arguments array
*
* @param {string[]} args - Command line arguments
* @returns {string|null} The pip command or null if not found
*/
export function getPipCommandForArgs(args) {
if (!args || args.length === 0) {
return null;
@ -30,12 +17,6 @@ export function getPipCommandForArgs(args) {
return null;
}
/**
* Checks if the arguments contain the --dry-run flag
*
* @param {string[]} args - Command line arguments
* @returns {boolean} True if --dry-run is present
*/
export function hasDryRunArg(args) {
return args.some((arg) => arg === "--dry-run");
}