UNPKG

@salesforce/salesforcedx-vscode-test-tools

Version:
18 lines (17 loc) 788 B
import { Duration } from './core'; /** * Retry a notification check * @param notificationPattern - The notification pattern to check * @param wait - The wait time for the notification to appear * @param methodToRunForEachTry - The method to run for each try * @returns */ export declare const verifyNotificationWithRetry: (notificationPattern: RegExp, wait?: Duration, methodToRunForEachTry?: () => Promise<void>) => Promise<true>; /** * Retry an operation * @param operation - The operation to retry * @param maxAttempts - The maximum number of attempts * @param errorMessage - The error message to log * @returns The result of the operation */ export declare const retryOperation: <T>(operation: () => Promise<T>, maxAttempts?: number, errorMessage?: string) => Promise<T>;