I have a question here, that we are presenting in our project.
We need to be able to control when KARATE gives an OK or a KO, right now this function always returns 0
regardless of whether a test fails or not..
This is a function:
karate.executable = function () {
let prefix = karate.config.dir ? '-Dkarate.config.dir=' + karate.config.dir + ' ' : '';
return prefix + 'com.intuit.karate:karate-core:' + karate.version + ':all';
};
karate.exec = function (args) {
if (!args) {
var args = process.argv.slice(2).join(' ');
console.log("ARGUMENT " + args)
}
process.env['KARATE_META'] = 'npm:' + process.env.npm_package_version;
var error = jbang.exec(karate.executable() + ' ' + args);
console.log("OUT " + error)
};
module.exports = karate;
I tried modifying the function, but it generates errors
I expect karate.exec to return a 1 if the test fails and a 0 if everything goes OK