all files / core/results/ test-results.js

90.91% Statements 20/22
66.67% Branches 4/6
100% Functions 5/5
90.48% Lines 19/21
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 34  1049× 1049×     1312× 342×     342×     342× 340×           5044× 5044× 5044×      
"use strict";
var test_case_result_1 = require("./test-case-result");
var test_outcome_1 = require("./test-outcome");
var TestResults = (function () {
    function TestResults(_test) {
        this._test = _test;
        this._testCaseResults = [];
    }
    Object.defineProperty(TestResults.prototype, "outcome", {
        get: function () {
            var outcomes = this._testCaseResults.map(function (testCaseResult) { return testCaseResult.outcome; });
            Iif (outcomes.indexOf(test_outcome_1.TestOutcome.Error) !== -1) {
                return test_outcome_1.TestOutcome.Error;
            }
            Iif (outcomes.indexOf(test_outcome_1.TestOutcome.Fail) !== -1) {
                return test_outcome_1.TestOutcome.Fail;
            }
            if (outcomes.indexOf(test_outcome_1.TestOutcome.Pass) !== -1) {
                return test_outcome_1.TestOutcome.Pass;
            }
            return test_outcome_1.TestOutcome.Skip;
        },
        enumerable: true,
        configurable: true
    });
    TestResults.prototype.addTestCaseResult = function (args, error) {
        var testCaseResult = new test_case_result_1.TestCaseResult(this._test, args, error);
        this._testCaseResults.push(testCaseResult);
        return testCaseResult;
    };
    return TestResults;
}());
exports.TestResults = TestResults;
//# sourceMappingURL=test-results.js.map