UNPKG

@jawis/jates

Version:
73 lines (72 loc) 1.6 kB
type Deps = { absTestFolder: string; }; /** * superficially tested. * * * todo * handling delete of test cases and modules. * abs/rel files are annoying */ export declare class TestAnalytics { private deps; private exexTime; tests: Map<string, number>; changedFiles: Set<string>; private cachedDtp; private directRequired; private directImpact; /** * */ constructor(deps: Deps); /** * */ setTests: (relFiles: string[]) => void; /** * not thought through * * - startLevel is the state test case are added as. Default is 'invalid test result' * * impl * - careful not to reset the level registered in `this.tests`. I.e. set by `setTestValid`. */ setTest: (absFile: string, startLevel?: number) => void; /** * - testId is relative. Per convention. */ setTestValid: (testId: string) => void; /** * - Remove if it's a tests. */ onDeletedFile: (absFile: string) => void; /** * */ onChangedFile: (absFile: string) => void; /** * */ addDependency: (source: string, target: string) => void; /** * */ setTestExecTime: (testId: string, execTime: number | undefined) => void; /** * * - if exec-time undefined test is but in front. */ sortTests: (tests: string[]) => string[]; /** * */ getDirectRequired: (id: string) => Set<string> | undefined; /** * non-caching DFS. * */ getTransitiveRequired: (id: string) => Set<string>; } export {};