stryker-git-checker
Version:
Git Checker for Stryker Mutator Javascript testing framework
40 lines • 1.25 kB
TypeScript
import { Checker, CheckResult } from "@stryker-mutator/api/check";
import { PluginContext, Injector } from "@stryker-mutator/api/plugin";
import { Logger } from "@stryker-mutator/api/logging";
import { Mutant } from "@stryker-mutator/api/core";
/**
* GitChecker factory.
*
* @param injector dependencies.
* @returns an instance of the plugin class.
*/
export declare function create(injector: Injector<PluginContext>): GitChecker;
export declare namespace create {
var inject: ["$injector"];
}
/**
* Git Checker plugin class.
*
* @todo add integration tests when they become viable.
*/
export declare class GitChecker implements Checker {
private readonly logger;
static inject: ["logger", "options"];
private diffMap;
constructor(logger: Logger);
/**
* Initializes the Git Checker Plugin by executing
* the `git diff` command and parsing output.
*
* @returns Void Promise.
*/
init: () => Promise<void>;
/**
* Checks if the mutant location has overlap with the Git diffs.
*
* @param mutant The mutant to be checked.
* @returns The Check Result.
*/
check: ({ fileName, location }: Mutant) => Promise<CheckResult>;
}
//# sourceMappingURL=git-checker.d.ts.map