UNPKG

@jawis/jates

Version:
48 lines (47 loc) 1.25 kB
import { TestRunner } from "./internal"; export type TestFrameworkProv = TestRunner & { getTestIds: () => Promise<string[]>; getCurrentSelectionTestIds: () => Promise<string[]>; }; export type TestFrameworkDeps = { absTestFolder: string; subFolderIgnore: string[]; runners: { [suffix: string]: TestRunner; }; }; /** * Composes all the frameworks that are supported. * */ export declare class ComposedTestFramework implements TestFrameworkProv { private deps; private suffixes; constructor(deps: TestFrameworkDeps); /** * Retrieves all tests. Test file suffixes are defined in configuration. * * - Test id is the relative filename. */ getTestIds: () => Promise<string[]>; /** * */ getCurrentSelectionTestIds: () => Promise<string[]>; /** * Returns true if a filename is a test case. */ private registeredTest; /** * Select the appropriate runner for a given test case. */ private getRunner; /** * Run a single test case and return the test logs. */ runTest: (id: string, absTestFile: string) => Promise<import("@jawis/jatec/typesTest").TestResult>; /** * */ kill: () => Promise<void>; }