"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.testCaptionFile = void 0;
const tslib_1 = require("tslib");
const chai_1 = require("chai");
const supertest_1 = tslib_1.__importDefault(require("supertest"));
function testCaptionFile(url, captionPath, toTest) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        const res = yield (0, supertest_1.default)(url)
            .get(captionPath)
            .expect(200);
        if (toTest instanceof RegExp) {
            (0, chai_1.expect)(res.text).to.match(toTest);
        }
        else {
            (0, chai_1.expect)(res.text).to.contain(toTest);
        }
    });
}
exports.testCaptionFile = testCaptionFile;
//# sourceMappingURL=captions.js.map