UNPKG

@n1k1t/mock-server

Version:

Powerful util to setup mocks over HTTP APIs

12 lines 558 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const models_1 = require("../models"); exports.default = models_1.Endpoint .build() .bindToHttp({ method: 'GET', path: '/expectations' }) .bindToIo({ path: 'expectations:get-list' }) .assignHandler(({ reply, server }) => reply.ok(server.providers .extract() .reduce((acc, provider) => acc.concat([...provider.storages.expectations.values()]), []) .map((expectation) => expectation.toPlain()))); //# sourceMappingURL=expectations.get-list.endpoint.js.map