@pact-foundation/pact
Version:
Pact for all things Javascript
15 lines • 652 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const ffi_1 = require("./ffi");
const matchers_1 = require("./matchers");
describe('V3 Pact FFI', () => {
describe('#contentTypeFromHeaders', () => {
it('uses matcher example value when content-type header is a matcher', () => {
const headers = {
'Content-Type': (0, matchers_1.regex)(/^application\/json(;\s?charset=[\w-]+)?$/i, 'application/json'),
};
expect((0, ffi_1.contentTypeFromHeaders)(headers, 'application/json')).toBe('application/json');
});
});
});
//# sourceMappingURL=ffi.spec.js.map