UNPKG

@stryker-mutator/core

Version:

The extendable JavaScript mutation testing framework

42 lines • 1.93 kB
import { StrykerOptions } from '@stryker-mutator/api/core'; import { Logger } from '@stryker-mutator/api/logging'; import { I } from '@stryker-mutator/util'; import { Project } from './project.js'; import { FileSystem } from './file-system.js'; export declare class ProjectReader { private readonly fs; private readonly log; private readonly mutatePatterns; private readonly testFilePatterns; private readonly ignoreRules; private readonly incremental; private readonly force; private readonly incrementalFile; static inject: ["fs", "logger", "options"]; constructor(fs: I<FileSystem>, log: Logger, { mutate, tempDirName, ignorePatterns, incremental, incrementalFile, force, htmlReporter, jsonReporter, testFiles, }: StrykerOptions); read(targetMutatePatterns: string[] | undefined): Promise<Project>; /** * Resolves test file patterns to actual file paths. * @param inputFileNames The list of all input file names to filter * @returns Array of resolved test file paths */ private resolveTestFiles; /** * Takes the list of file names and creates file description object from it, containing logic about wether or not it needs to be mutated. * If a mutate pattern starts with a `!`, it negates the pattern. * @param inputFileNames the file names to filter * @param targetMutatePatterns optional mutate patterns to limit the initial scope of files to mutate (with ranges) */ private resolveFileDescriptions; private unionFileDescriptions; private intersectFileDescriptions; /** * Filters a given list of file names given a mutate pattern. * @param fileNames the file names to match to the pattern * @param mutatePattern the pattern to match with */ private filterMutatePattern; private resolveInputFileNames; private readIncrementalReport; } //# sourceMappingURL=project-reader.d.ts.map