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

100% Statements 23/23
100% Branches 6/6
100% Functions 6/6
100% Lines 23/23
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50  5321× 5321× 5321×     6932× 73× 41×   32×   6859× 14×   6845×           5224×           5229×           13×            
"use strict";
var test_outcome_1 = require("./test-outcome");
var _errors_1 = require("../_errors");
var TestCaseResult = (function () {
    function TestCaseResult(test, testCaseArguments, error) {
        this._test = test;
        this._arguments = testCaseArguments;
        this._error = error;
    }
    Object.defineProperty(TestCaseResult.prototype, "outcome", {
        get: function () {
            if (this._error) {
                if (this._error instanceof _errors_1.MatchError) {
                    return test_outcome_1.TestOutcome.Fail;
                }
                return test_outcome_1.TestOutcome.Error;
            }
            if (this._test.ignored) {
                return test_outcome_1.TestOutcome.Skip;
            }
            return test_outcome_1.TestOutcome.Pass;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TestCaseResult.prototype, "test", {
        get: function () {
            return this._test;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TestCaseResult.prototype, "arguments", {
        get: function () {
            return this._arguments;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TestCaseResult.prototype, "error", {
        get: function () {
            return this._error;
        },
        enumerable: true,
        configurable: true
    });
    return TestCaseResult;
}());
exports.TestCaseResult = TestCaseResult;
//# sourceMappingURL=test-case-result.js.map