UNPKG

cbfl

Version:

library that can be used to automatically find points of failure in TypeScript Modules that are tested with Mocha

35 lines (34 loc) 1.11 kB
interface IFaultyFile { path: string; lines: Map<number, Set<string>>; statements: Map<number, Set<string>>; functions: Map<number, Set<string>>; functionMap: Map<number, IFunctionInformation>; } interface IFunctionInformation { start: ILocation; end: ILocation; name: string; } interface ILocation { line: number; column: number; } interface IFailedTest { name: string; } export declare class FaultLocalizations { faultyFiles: Map<string, IFaultyFile>; failedTests: Map<string, IFailedTest>; getOrCreateFaultyFile(coverage: any, changedLineCoveragePath: string): IFaultyFile; createFaultyFile(coverage: any, changedLineCoveragePath: string): IFaultyFile; private createFunctionMap; addFailedTest(path: string, name: string): void; addFailedLine(coverage: any, changedLineCoveragePath: string, lineNumber: number, failedTestPath: string): void; private getFunctionIDForLineNumber; generateComment(): string; saveToFile(commitID: string): Promise<void>; private static replacer; private static reviver; } export {};