UNPKG

@case-contract-testing/case

Version:

Next-generation contract testing suite

12 lines (11 loc) 482 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.nameMock = void 0; const matchers_1 = require("../../entities/nodes/matchers"); const nameMatcher = (matcher, context) => (0, matchers_1.coreLookupMatcher)(context.descendAndDescribe(matcher, context), matcher); const nameMock = (mock, context) => ({ ...mock, request: nameMatcher(mock.request, context), response: nameMatcher(mock.response, context), }); exports.nameMock = nameMock;