IF Commons GitHub

mutation

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-docs FR-027

The mutation score of a library (docs 0001-docs FR-027): the share of the changes a mutation tool made to the library's code (a > made >=, a string made empty, a body emptied) that its tests noticed. summariseStryker reads the report of Stryker (the mutation-testing-elements schema) into the small form the evidence keeps, parseMutation reads that form, and scoreOf is the share that the tests killed. A mutant that survives is a change no test notices: the place where the tests prove least.

Source: commons/docs/src/mutation.ts

3 of 5 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

FileMutationinterfaceno test imports it
interface FileMutation

The mutants of one source file, by what became of them.

MemberTypeWhat it is
pathstringFrom the root of the repository.
killednumber
timeoutnumber
survivednumber
noCoveragenumber
survivorsreadonly Survivor[]
LibraryMutationinterfaceno test imports it
interface LibraryMutation

The mutation run of one library.

MemberTypeWhat it is
librarystring
filesreadonly FileMutation[]
parseMutationfunction
function parseMutation(text: string): { readonly value: LibraryMutation; } | { readonly error: string; }

What tools/mutation.ts kept ({ "library": ..., "files": [...] }), or why it cannot be read.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

scoreOffunction
function scoreOf(files: readonly Pick<FileMutation, "killed" | "noCoverage" | "survived" | "timeout">[]): number | undefined

The share of the mutants that the tests detected, as a percent with a decimal, or undefined where there were none to detect (errors and ignored mutants are not counted).

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

summariseStrykerfunction
function summariseStryker(text: string, library: string, base: string): { readonly value: LibraryMutation; } | { readonly error: string; }

Stryker's report as the small form: base is the folder of the library from the root, which the paths of the report are relative to.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.