# Feature catalog — pact-foundation/pact-js

> Canonical page: https://codevetter.com/unpack/pact-js/feature-catalog

# Feature catalog — pact-foundation/pact-js

Scanned commit 18f30a1aa44a948b3249a72879da3cff26c42d12 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The public surface supports HTTP request/response contracts, asynchronous event contracts, synchronous messages, and GraphQL over HTTP. Matching APIs express flexible contracts while supplying concrete examples to consumer tests. Provider callbacks, broker options, interaction metadata, and plugins support more involved verification workflows.
- V4 HTTP tests configure method/path, query parameters, headers, body, and expected status through fluent builders, then execute a callback against a dynamic mock server with configurable host, port, TLS, and CORS. — [src/v4/http/unconfiguredInteraction.ts#L86-L101](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/unconfiguredInteraction.ts#L86-L101) [src/v4/http/requestBuilder.ts#L13-L52](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/requestBuilder.ts#L13-L52) [src/v4/http/interactionWithRequest.ts#L26-L42](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/interactionWithRequest.ts#L26-L42) [src/v4/http/index.ts#L40-L61](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/index.ts#L40-L61)
- MatchersV3 supplies type, regex, numeric, bounded-array, key/value, status-code, date/time, UUID, URL, equality, inclusion, null, and array-containing declarations. — [src/v3/matchers.ts#L44-L131](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v3/matchers.ts#L44-L131) [src/v3/matchers.ts#L154-L242](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v3/matchers.ts#L154-L242) [src/v3/matchers.ts#L249-L343](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v3/matchers.ts#L249-L343) [src/v3/matchers.ts#L418-L628](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v3/matchers.ts#L418-L628)
- HTTP builders accept binary files, Buffer bodies, multipart files with an optional boundary, and explicit matching rules; XmlBuilder and XmlElement construct XML templates containing text and repeated-element matchers. — [src/v4/http/requestBuilder.ts#L63-L114](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/requestBuilder.ts#L63-L114) [src/v4/http/responseBuilder.ts#L40-L89](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/responseBuilder.ts#L40-L89) [src/xml/xmlBuilder.ts#L6-L17](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/xml/xmlBuilder.ts#L6-L17) [src/xml/xmlElement.ts#L58-L91](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/xml/xmlElement.ts#L58-L91)
- addGraphQLInteraction supports operation names, variables, queries, and mutations; query text is validated and wrapped in a whitespace-flexible regex inside an application/json request body. — [src/v4/graphql/index.ts#L34-L78](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/graphql/index.ts#L34-L78) [src/v4/graphql/graphQLInteractionWithRequest.ts#L54-L84](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/graphql/graphQLInteractionWithRequest.ts#L54-L84) [src/common/graphQL/graphQL.ts#L17-L54](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/common/graphQL/graphQL.ts#L17-L54)
- V4 asynchronous messages support JSON or binary content, metadata, and explicit rules; synchronous messages separately configure request and response content and expose Request plus a Response array to callbacks. — [src/v4/message/asynchronousMessage.ts#L201-L241](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/message/asynchronousMessage.ts#L201-L241) [src/v4/message/index.ts#L165-L193](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/message/index.ts#L165-L193) [src/v4/message/index.ts#L236-L277](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/message/index.ts#L236-L277) [src/v4/message/index.ts#L455-L465](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/message/index.ts#L455-L465)
- Provider verification supports named state setup/teardown handlers, beforeEach/afterEach hooks, Express request filters, message producer registries, TLS client credentials, and optional broker result publication. — [src/dsl/verifier/proxy/types.ts#L35-L62](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/proxy/types.ts#L35-L62) [src/dsl/verifier/proxy/proxy.ts#L47-L78](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/proxy/proxy.ts#L47-L78) [docs/provider.md#L70-L81](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/docs/provider.md#L70-L81)
- given accepts state parameters, fromProviderState declares generator expressions, and provider callbacks can return generated values; the account example connects ${accountId} to the handler's returned accountId. — [src/v3/pact.ts#L75-L98](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v3/pact.ts#L75-L98) [src/v3/matchers.ts#L592-L601](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v3/matchers.ts#L592-L601) [examples/provider-state/consumer.test.ts#L32-L58](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/examples/provider-state/consumer.test.ts#L32-L58) [examples/provider-state/provider.test.ts#L27-L39](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/examples/provider-state/provider.test.ts#L27-L39)
- HTTP and message builders support pending flags, comments, test names, and grouped references; usingPlugin loads named/versioned plugins, and message plugin builders can start custom transports. — [src/v4/http/unconfiguredInteraction.ts#L49-L79](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/unconfiguredInteraction.ts#L49-L79) [src/v4/message/asynchronousMessage.ts#L107-L148](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/message/asynchronousMessage.ts#L107-L148) [src/v4/message/index.ts#L58-L99](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/message/index.ts#L58-L99) [src/v4/message/index.ts#L291-L321](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/message/index.ts#L291-L321)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
