The goal is to fail the build of the pipeline when the stryker scores lower than X. How it can be configured in the Jenkins file or some other approach?
The stryker conf:
config.set({
mutator: "javascript",
mutate: [...],
testRunner: "jest",
jest: {
projectType: "node",
config: require("jest.config.js"),
enableFindRelatedTests: true,
},
loglevel: "trace",
packageManager: "yarn",
reporters: ["html", "clear-text", "progress", "dashboard"],
transpilers: [],
coverageAnalysis: "off",
});
The piece of Jenkins file:
"Stryker test": {
stage('Mutation') {
node("${containerName}") {
container("${containerName}") {
unstash name: 'myApp'
dir("./my") {
sh '''hostname
./node_modules/.bin/stryker run
'''
}