pact-foundation / pact-specification

Describes the pact format and verification specifications
MIT License
295 stars 28 forks source link

Add number range matcher #93

Open davetc4k opened 2 years ago

davetc4k commented 2 years ago

Thank you for Pact we have adopted it at my company.

I am new to Pact so I may be wrong here as perhaps when testing for a number the matcher like(1) , number(1) or float(1.1) cover the use cases and if you want the number to be in a range you should test the response using a separate unit test (?)

Anyway, I would ask that a matcher is available for a number within a certain range e.g. [0-5].

Useful when API requests return 0 or 1 instead of false / true, or day of the week 0-5 and so on. Thanks for your time. Please let me know how to get more involved in this project if you have time.