Modern QA2026Pact Matchers Quick Reference — tiles
Log inJoin
25 / 89 · 04 API & Contract Testing with AI · AI-Enhanced Contract Generation and Maintenance← prev⊞ allnext →☰ Read as one page

4.5Pact Matchers Quick Reference

Matcher Purpose Example
like(value) Match type, not exact value like("any string")
eachLike(example) Array where each element matches eachLike({id: uuid()})
uuid() Valid UUID format uuid()
decimal(example) Decimal number decimal(29.99)
integer(example) Integer number integer(42)
boolean(example) Boolean value boolean(true)
term({generate, regex}) Match regex pattern term({generate: "electronics", regex: "electronics|clothing"})
datetime(format, example) ISO datetime datetime("yyyy-MM-dd'T'HH:mm:ss", "2026-01-01T00:00:00")