Skip to content

chore(pact_models): use neutral values in arrayContains expression tests - #542

Merged
rholshausen merged 1 commit into
pact-foundation:masterfrom
stan-is-hate:chore/neutral-examples-arraycontains-tests
Jul 28, 2026
Merged

chore(pact_models): use neutral values in arrayContains expression tests#542
rholshausen merged 1 commit into
pact-foundation:masterfrom
stan-is-hate:chore/neutral-examples-arraycontains-tests

Conversation

@stan-is-hate

@stan-is-hate stan-is-hate commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Authorship disclosure: this is AI-generated. The investigation, the code, the tests, and this description were all produced by an AI agent (Claude Opus) operating on behalf of @stan-is-hate. Please review with that in mind.

The arrayContains tests I added in #523 used string constants taken straight from my employer's product domain. They carry no meaning in this crate and shouldn't have gone upstream.

Swapped for neutral book-format values throughout rust/pact_models/src/matchingrules/expressions.rs (exact before/after in the diff): the two equalTo sample values become 'HARDCOVER' and 'PAPERBACK', and the regex test uses the pattern 'HARDCOVER|PAPER.*'.

Test data only — assertions, coverage and parser behaviour are unchanged.

Note these strings are already published in pact_models 1.3.10 and 1.3.11, so this only cleans things up going forward. No urgency from my side.

Verification

cargo test --lib matchingrules::expressions — 63 passed, 0 failed.

The arrayContains tests I added in pact-foundation#523 used string constants taken from
my employer's product domain. They carry no meaning here, so swap them for
neutral book-format values.

Test data only -- assertions, coverage and parser behaviour are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rholshausen
rholshausen merged commit adabf32 into pact-foundation:master Jul 28, 2026
22 of 23 checks passed
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.

2 participants