all files / cli/ cli-test-runner.js

86.96% Statements 20/23
63.64% Branches 7/11
100% Functions 6/6
95% Lines 19/20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33                           
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var alsatian_core_1 = require("../core/alsatian-core");
var CliTestRunner = (function (_super) {
    __extends(CliTestRunner, _super);
    function CliTestRunner() {
        _super.apply(this, arguments);
    }
    CliTestRunner.prototype.run = function (testSet) {
        try {
            var testRunPromise = _super.prototype.run.call(this, testSet);
            testRunPromise.then(function (results) {
                Iif (results.outcome === alsatian_core_1.TestOutcome.Error || results.outcome === alsatian_core_1.TestOutcome.Fail) {
                    process.exit(1);
                }
                else {
                    process.exit(0);
                }
            });
        }
        catch (error) {
            process.stderr.write(error.message);
            process.exit(1);
        }
    };
    return CliTestRunner;
}(alsatian_core_1.TestRunner));
exports.CliTestRunner = CliTestRunner;
//# sourceMappingURL=cli-test-runner.js.map