3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

Answer product-owner round 1: 0 🔴, 1 🟡 (0 misread); the README names the memory a mutation run needs, and a RuntimeError lists its mutants and the likely cause

This commit is contained in:
2026-10-28 20:21:29 +01:00
committed by Lillem4n
parent 141db21216
commit fac55a8a63
7 changed files with 32 additions and 25 deletions
+6 -4
View File
@@ -1,9 +1,11 @@
import { readFileSync } from 'node:fs'
import config from './stryker.config.mjs'
const mutants = Object.values(JSON.parse(readFileSync(config.jsonReporter.fileName, 'utf8')).files).flatMap((file) => file.mutants)
const errors = mutants.filter((mutant) => mutant.status === 'RuntimeError').length
if (errors > 0) {
console.error(`${errors} of ${mutants.length} mutants ended as RuntimeError, so each may hide a survivor`)
const files = Object.entries(JSON.parse(readFileSync(config.jsonReporter.fileName, 'utf8')).files)
const mutants = files.flatMap(([path, file]) => file.mutants.map((mutant) => ({ ...mutant, path })))
const errors = mutants.filter((mutant) => mutant.status === 'RuntimeError')
if (errors.length > 0) {
console.error(`${errors.length} of ${mutants.length} mutants ended as RuntimeError, so each may hide a survivor. A test run killed for lack of memory ends so:`)
for (const mutant of errors) console.error(` ${mutant.path}:${mutant.location.start.line} ${mutant.mutatorName}`)
process.exit(1)
}