allure-jest
Version:
Allure Jest integration
27 lines (26 loc) • 923 B
TypeScript
import type { Circus } from "@jest/types";
/**
* Returns array of names which represents full test hierarchy
* Omits ROOT_DESCRIBE_BLOCK because it shouldn't be reported
*
* @param test Test or describe block
* @returns
*/
export declare const getTestPath: (test: Circus.TestEntry | Circus.DescribeBlock) => string[];
/**
* Returns starndartized test name what can be used as test Id
*
* @see https://github.com/jestjs/jest/blob/25a8785584c9d54a05887001ee7f498d489a5441/packages/jest-circus/src/utils.ts#L410
* @param path Path memebers
* @returns
*/
export declare const getTestId: (path: string[]) => string;
/**
* Returns test full name (test hierarchy joined by " > ")
*
* @param path Path memebers
* @returns
*/
export declare const getTestFullName: (path: string[]) => string;
export declare const shouldHookBeSkipped: (hook: Circus.Hook) => boolean;
export declare const last: <T>(array: T[]) => T;