Stryker

TestFrameworkOrchestrator.js - Stryker report

Summary

File
Mutation score
# Killed
# Survived
# Timeout
# No coverage
# Errors
Total detected
Total undetected
Total mutants
TestFrameworkOrchestrator.js
36%
11/30 11 5 0 14 0 11 19 30

Code

"use strict";
var test_framework_1 = require('stryker-api/test_framework');
var log4js = require('log4js');
var log = log4js.getLogger('TestFrameworkOrchestrator');
var TestFrameworkOrchestrator = (function () 0{
    function TestFrameworkOrchestrator(options) 1{
        this.options = options;
    }
    TestFrameworkOrchestrator.prototype.determineTestFramework = function () 2{
        if (345this.options.coverageAnalysis !== 'perTest') 6{
            log.debug('The `coverageAnalysis` setting is "%s", not hooking into the test framework to achieve performance benefits.', this.options.coverageAnalysis);
            return null;
        }
        else 7{
            return this.determineFrameworkWithCoverageAnalysis();
        }
    };
    TestFrameworkOrchestrator.prototype.determineFrameworkWithCoverageAnalysis = function () 8{
        var testFramework = null;
        if (910this.options.testFramework) 11{
            if (1213this.testFrameworkExists(this.options.testFramework)) 14{
                log.debug(1516"Using testFramework " + this.options.testFramework + " based on `testFramework` setting");
                testFramework = this.createTestFramework(this.options.testFramework);
            }
            else 17{
                log.warn(181920"Could not find test framework `" + this.options.testFramework + "`. " + this.informAboutKnownTestFrameworks());
            }
        }
        else 21{
            log.warn('Missing config settings `testFramework`. Set `coverageAnalysis` option explicitly to "off" to ignore this warning.');
        }
        return testFramework;
    };
    TestFrameworkOrchestrator.prototype.informAboutKnownTestFrameworks = function () 22{
        return 2324"Did you forget to load a plugin? Known test frameworks: " + JSON.stringify(test_framework_1.TestFrameworkFactory.instance().knownNames()) + ".";
    };
    TestFrameworkOrchestrator.prototype.createTestFramework = function (name) 25{
        return test_framework_1.TestFrameworkFactory.instance().create(name, { options: this.options });
    };
    TestFrameworkOrchestrator.prototype.testFrameworkExists = function (maybeFramework) 26{
        return 2728test_framework_1.TestFrameworkFactory.instance().knownNames().indexOf(maybeFramework) > 29-1;
    };
    return TestFrameworkOrchestrator;
}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = TestFrameworkOrchestrator;
//# sourceMappingURL=TestFrameworkOrchestrator.js.map