UNPKG

allure-jest

Version:
29 lines (28 loc) 1.08 kB
import type { Circus } from "@jest/types"; import type { TestPlanV1 } from "allure-js-commons/sdk"; /** * 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 * * @doc 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; export declare const isTestPresentInTestPlan: (testFullName: string, testPlan: TestPlanV1) => boolean;