Skip to content

test(consumer): cover matchers combined with OR in integration JSON - #55

Draft
YOU54F wants to merge 2 commits into
masterfrom
feat/or-matcher
Draft

YOU54F wants to merge 2 commits into
masterfrom
feat/or-matcher

Conversation

@YOU54F

@YOU54F YOU54F commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Summary

Adds test/or-matcher.integration.spec.ts, which sends bodies, headers and query parameters with "pact:matcher:combine": "OR" integration JSON through pact-js-core. It checks both the matching rules written to the pact file and the mock server's behaviour (each alternative matches, and a value matching none of them fails).

No API change is needed in pact-js-core. Integration JSON is passed through as is.

The pin commit also forces CI to build prebuilds, so that YOU54F/pact-js feat/or-matcher can consume them.

Testing

Passed locally against a pact_ffi build with pact-foundation#601.

Depends on

Warning

The last commit (test: consume pact_ffi 0.5.13-or.1 … (revert before merge)) points this repo at the fork prerelease so CI can test it end to end. Revert it and bump to the released pact_ffi before merging upstream.

🤖 Generated with Claude Code

YOU54F and others added 2 commits November 9, 2026 17:33
Add a consumer integration test that sends `pact:matcher:combine: "OR"`
integration JSON in a request body, header and query parameter. It checks
that each alternative matches, that values matching none of them fail,
that matchers nested in the example of an optional object still apply,
and that the written pact file has the rules combined with OR.

The integration JSON is passed to the FFI unchanged, so no code change is
needed. Requires a pact_ffi with pact-foundation/pact-reference#601.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…evert before merge)

Points download-ffi.sh at the YOU54F/pact-reference fork prerelease
(overridable with PACT_FFI_BASEURL), bumps PACT_FFI_VERSION to
0.5.13-or.1, and forces the prebuild path in CI (as if the PR title
contained "(rebuild)") so the native addon is built against the rc
instead of fetching published prebuilds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant