pact-foundation / pact-js

JS version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
https://pact.io
Other
1.63k stars 349 forks source link

feat: support matching numbers, bool in query strings #1211

Closed mefellows closed 7 months ago

mefellows commented 7 months ago

In reviewing the query DSL, we are only allowing matching on string values or matchers that work on strings.

However, the matching capability actually does extend to checking the types of query parameters, even if their underlying representation in is a string.

This change allows both boolean and number types to be used in matching rules.

In a future change, we should also support the ability to have empty and no values (as per https://github.com/pact-foundation/pact-reference/pull/411).