playwright-flake-checker
Version:
A tool to check for flaky Playwright tests by running them multiple times and analyzing results.
35 lines (34 loc) • 1.59 kB
TypeScript
/**
* Retrieves the application configuration as a readonly object.
* Returns a copy of the config object to prevent direct modification of the original.
*
* @returns {Readonly<Config>} A readonly copy of the configuration object
*/
export declare const getConfig: () => Readonly<Config>;
/**
* Updates the global configuration by merging the current configuration
* with the provided partial configuration.
*
* @param newConfig - Partial configuration object containing settings to be updated
*/
export declare const updateConfig: (newConfig: Partial<Config>) => void;
/**
* Prompts the user to enter a configuration filename and validates its existence.
* The function will continue to prompt until a valid file path is provided.
*
* @returns {Promise<string>} A Promise that resolves to the validated configuration file path
*/
export declare const getCustomConfig: () => Promise<string>;
/**
* Searches for Playwright configuration files in the current working directory.
*
* This function looks for files ending with '.config.js' or '.config.ts' that
* include a reference to '@playwright/test'. If multiple configuration files
* are found, it presents a selection menu for the user to choose from. If no
* configuration files are found, or if the user selects the custom option,
* it prompts for a custom configuration file path.
*
* @returns {Promise<string>} A promise that resolves to either a string
* representing the selected configuration file path, or an array of configuration paths.
*/
export declare const findConfigFiles: () => Promise<string>;