"use strict";
var path = require("path");
var TestSet = (function () {
function TestSet(_testLoader, _globHelper) {
this._testLoader = _testLoader;
this._globHelper = _globHelper;
this._testFixtures = [];
}
Object.defineProperty(TestSet.prototype, "testFixtures", {
get: function () {
return this._testFixtures;
},
enumerable: true,
configurable: true
});
TestSet.prototype.addTestsFromFiles = function (testsFileLocations) {
if (typeof testsFileLocations === "string") {
testsFileLocations = [testsFileLocations];
}
this._loadTestFixtures(testsFileLocations);
};
TestSet.prototype._loadTestFixtures = function (testFileLocations) {
var _this = this;
testFileLocations.forEach(function (testFileLocation) {
testFileLocation = path.join(process.cwd(), testFileLocation);
if (_this._globHelper.isGlob(testFileLocation)) {
var physicalTestFileLocations = _this._globHelper.resolve(testFileLocation);
physicalTestFileLocations.forEach(function (physicalTestFileLocation) {
_this._testFixtures = _this.testFixtures.concat(_this._testLoader.loadTestFixture(physicalTestFileLocation));
});
}
else {
_this._testFixtures = _this.testFixtures.concat(_this._testLoader.loadTestFixture(testFileLocation));
}
});
};
return TestSet;
}());
exports.TestSet = TestSet;
//# sourceMappingURL=test-set.js.map |