# Testing signals — pact-foundation/pact-js

> Canonical page: https://codevetter.com/unpack/pact-js/testing-signals

# Testing signals — 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.

Tests and CI were inspected, not executed; their existence establishes intended checks rather than passing results. Root Vitest combines mocked unit tests with native-backed integration tests, while examples and regression packages run consumer suites before provider suites. This is a bounded inspection, and the selected lifecycle specs do not establish coverage of every mismatch, persistence, transport, or cleanup failure branch.
- Root npm test maps to vitest run with a plugin-installing pretest; Vitest discovers src/**/*.spec.ts, uses forks and 60-second timeouts, writes JUnit output, and configures V8 coverage with 50% line/statement thresholds. — [package.json#L23-L25](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/package.json#L23-L25) [vitest.config.ts#L3-L24](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/vitest.config.ts#L3-L24)
- The inspected V3 and V4 HTTP lifecycle specs replace ConsumerPact operations with mocks and assert CORS, HTTP/HTTPS selection, and a negative startup result; those files do not test mismatch rejection or write/cleanup exceptions. — [src/v3/pact.spec.ts#L10-L113](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v3/pact.spec.ts#L10-L113) [src/v4/http/index.spec.ts#L11-L124](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/v4/http/index.spec.ts#L11-L124)
- hooks.spec.ts drives synthetic setup/teardown requests to test once-per-interaction execution, multiple states, subsequent interactions after hook failure, continued next(), and retried setup idempotence. — [src/dsl/verifier/proxy/hooks.spec.ts#L9-L17](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/proxy/hooks.spec.ts#L9-L17) [src/dsl/verifier/proxy/hooks.spec.ts#L24-L117](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/proxy/hooks.spec.ts#L24-L117)
- Verifier tests mock the proxy and check closure on resolution/rejection plus exclusion of TLS credentials from core options; proxyRequest tests inspect target credentials, SSL/origin options, proxy-env precedence, and readable buffers, without establishing a real mTLS handshake. — [src/dsl/verifier/verifier.spec.ts#L11-L25](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/verifier.spec.ts#L11-L25) [src/dsl/verifier/verifier.spec.ts#L131-L176](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/verifier.spec.ts#L131-L176) [src/dsl/verifier/proxy/proxyRequest.spec.ts#L25-L82](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/proxy/proxyRequest.spec.ts#L25-L82) [src/dsl/verifier/proxy/proxyRequest.spec.ts#L86-L145](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/dsl/verifier/proxy/proxyRequest.spec.ts#L86-L145)
- pact.integration.spec.ts uses actual Axios and TCP interactions, reads generated pact JSON to assert metadata/references, and exercises the MATT plugin over HTTP and synchronous TCP. — [src/pact.integration.spec.ts#L18-L36](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/pact.integration.spec.ts#L18-L36) [src/pact.integration.spec.ts#L113-L186](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/pact.integration.spec.ts#L113-L186) [src/pact.integration.spec.ts#L239-L349](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/pact.integration.spec.ts#L239-L349) [src/pact.integration.spec.ts#L353-L444](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/src/pact.integration.spec.ts#L353-L444)
- Regression configs explicitly enumerate consumer/provider files and alias the SDK to src/index.ts; provider configuration substitutes an aws-sdk mock and inlines graphql-http, while the package runs consumers before providers after cleaning pact outputs. — [regression/vitest.config.consumer.ts#L4-L32](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/regression/vitest.config.consumer.ts#L4-L32) [regression/vitest.config.provider.ts#L4-L34](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/regression/vitest.config.provider.ts#L4-L34) [regression/package.json#L4-L8](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/regression/package.json#L4-L8)
- Example suites cover application-client HTTP calls, GraphQL query requests, message handling/production, and provider-generated IDs; their manifests separate consumer and provider commands and order them in npm test. — [examples/http/consumer.test.ts#L64-L74](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/examples/http/consumer.test.ts#L64-L74) [examples/graphql/consumer.test.ts#L33-L58](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/examples/graphql/consumer.test.ts#L33-L58) [examples/messages/provider.test.ts#L20-L42](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/examples/messages/provider.test.ts#L20-L42) [examples/provider-state/package.json#L6-L9](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/examples/provider-state/package.json#L6-L9)
- Test CI defines Node 22/24/26 across macOS, Linux x64/ARM, and Windows, plus Alpine, lint, format, examples, and regression jobs; the completion job rejects failed, cancelled, or skipped dependencies and unit jobs upload coverage/test reports. — [.github/workflows/test.yml#L26-L49](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/.github/workflows/test.yml#L26-L49) [.github/workflows/test.yml#L86-L152](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/.github/workflows/test.yml#L86-L152) [.github/workflows/test.yml#L158-L177](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/.github/workflows/test.yml#L158-L177) [.github/workflows/test.yml#L179-L223](https://github.com/pact-foundation/pact-js/blob/18f30a1aa44a948b3249a72879da3cff26c42d12/.github/workflows/test.yml#L179-L223)

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)
