"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockHTTP = void 0;
const tslib_1 = require("tslib");
const express_1 = tslib_1.__importDefault(require("express"));
const shared_1 = require("./shared");
class MockHTTP {
    initialize() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const app = (0, express_1.default)();
            app.get('/*', (req, res, next) => {
                return res.sendStatus(200);
            });
            this.server = yield (0, shared_1.randomListen)(app);
            return (0, shared_1.getPort)(this.server);
        });
    }
    terminate() {
        return (0, shared_1.terminateServer)(this.server);
    }
}
exports.MockHTTP = MockHTTP;
//# sourceMappingURL=mock-http.js.map