UNPKG

@n1k1t/mock-server

Version:

The ultimate toolkit to intercept, transform, and simulate HTTP/WS traffic with type-safe expectations

28 lines 997 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SystemSocketIoRequestContext = void 0; const models_1 = require("../../../models"); const reply_1 = require("./reply"); class SystemSocketIoRequestContext extends models_1.RequestContext { constructor(server, request) { super(server.providers.default, { transport: 'io' }); this.server = server; this.request = request; this.incoming = { type: 'json', data: this.request.data, path: this.request.path, method: 'NONE', headers: {}, query: {}, raw: {}, }; this.reply = reply_1.SystemSocketIoReply.build(this); this.snapshot = this.compileSnapshot(); } static build(server, request) { return new SystemSocketIoRequestContext(server, request); } } exports.SystemSocketIoRequestContext = SystemSocketIoRequestContext; //# sourceMappingURL=context.js.map