cypress-xray-plugin
Version:
A Cypress plugin for uploading test results to Xray (test management for Jira)
59 lines (58 loc) • 1.88 kB
TypeScript
/**
* Returns an error message of any error.
*
* @param error - the error
* @returns the error message
*/
export declare function errorMessage(error: unknown): string;
/**
* An error which has been logged to a file or other log locations already.
*/
export declare class LoggedError extends Error {
}
/**
* Assesses whether the given error is an instance of a {@link LoggedError | `LoggedError`}.
*
* @param error - the error
* @returns `true` if the error is a {@link LoggedError | `LoggedError`}, otherwise `false`
*/
export declare function isLoggedError(error: unknown): boolean;
/**
* An error which is thrown when a command is skipped.
*/
export declare class SkippedError extends Error {
}
/**
* Assesses whether the given error is an instance of a {@link SkippedError | `SkippedError`}.
*
* @param error - the error
* @returns `true` if the error is a {@link SkippedError | `SkippedError`}, otherwise `false`
*/
export declare function isSkippedError(error: unknown): error is SkippedError;
/**
* Returns an error describing that a test issue key is missing in the tags of a Cucumber scenario.
*
* @param scenario - the Cucumber scenario
* @param projectKey - the project key
* @param isCloudClient - whether Xray cloud is being used
* @returns the error
*/
export declare function missingTestKeyInCucumberScenarioError(scenario: {
keyword: string;
name: string;
steps: readonly {
keyword: string;
text: string;
}[];
tags?: readonly {
name: string;
}[];
}, projectKey: string, isCloudClient: boolean): Error;
/**
* Returns an error describing that a test issue key is missing in a test title.
*
* @param title - the test title
* @param projectKey - the project key
* @returns the error
*/
export declare function missingTestKeyInTestTitleError(title: string, projectKey: string): Error;