all files / core/ test-fixture.js

95% Statements 19/20
75% Branches 3/4
100% Functions 6/6
94.44% Lines 17/18
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  437× 437× 437× 437× 437×     315×     315×   189613×   19391× 19371×   40×      
"use strict";
var TestFixture = (function () {
    function TestFixture() {
        this.focussed = false;
        this.ignored = false;
        this.ignoreReason = undefined;
        this.fixture = {};
        this.tests = [];
    }
    TestFixture.prototype.addTest = function (test) {
        // if the test is already here, don't add it
        Iif (this.tests.indexOf(test) !== -1) {
            return;
        }
        this.tests.push(test);
    };
    TestFixture.prototype.getTests = function () {
        var anyTestsFocussed = this.tests.filter(function (t) { return t.focussed; }).length > 0;
        // if there are no tests focussed, return them all
        if (!anyTestsFocussed) {
            return this.tests;
        }
        return this.tests.filter(function (t) { return t.focussed; });
    };
    return TestFixture;
}());
exports.TestFixture = TestFixture;
//# sourceMappingURL=test-fixture.js.map