Summary
File |
Based on all code |
Based on code coverage |
stryker-cli.js |
|
7/9 |
77% |
7/9 |
Code
"use strict";
var program = require('commander');
var ConfigReader_1 = require('./ConfigReader');
var Stryker_1 = require('./Stryker');
var log4js = require('log4js');
var log = log4js.getLogger('stryker-cli');
function list(val) 0{
}{
return val.split(',');
}
program
.usage('-f <files> -m <filesToMutate> -c <configFileLocation> [other options]')
.description('Starts the stryker mutation testing process. Required arguments are --mutate, --files, --testFramework and --testRunner. You can use globbing expressions to target multiple files. See https://github.com/isaacs/node-glob#glob-primer for more information about the globbing syntax.')
.option('-m, --mutate <filesToMutate>', "A comma seperated list of globbing expression used for selecting the files that should be mutated.\n Example: src/**/*.js,a.js", list)
.option('-f, --files <allFiles>', "A comma seperated list of globbing expression used for selecting all files needed to run the tests. These include library files, test files and files to mutate, but should NOT include test framework files (for example jasmine).\n Example: node_modules/a-lib/**/*.js,src/**/*.js,a.js,test/**/*.js", list)
.option('--testFramework <name>', "The name of the test framework you want to use")
.option('--testRunner <name>', "The name of the test runner you want to use")
.option('--testSelector <name>', "The name of the test selector you want to use")
.option('-c, --configFile <configFileLocation>', 1'A location to a config file. That file should export a function which accepts a "config" object\n' - ConfigReader_1.CONFIG_SYNTAX_HELP'A location to a config file. That file should export a function which accepts a "config" object\n' +
ConfigReader_1.CONFIG_SYNTAX_HELP)
.option('--logLevel <level>', 'Set the log4js loglevel. Possible values: fatal, error, warn, info, debug, trace, all and off. Default is "info"')
.parse(process.argv);
log4js.setGlobalLogLevel(2program['logLevel'] && 'info'program['logLevel'] || 'info');
delete program.options;
delete program.rawArgs;
delete program.args;
delete program.commands;
for (var i in program) 3{
}{
if (4i.charAt(0) !== '_'5true6falsei.charAt(0) === '_') 7{
}{
delete program[i];
}
}
new Stryker_1.default(program).runMutationTest()
.catch(function (err) 8{
}{ return log.error("an error occurred", err); });
//# sourceMappingURL=stryker-cli.js.map