surpher/PactSwift

Bug: RegexLike(_:term:) matcher does not verify value against pattern

Closed this issue ยท 0 comments

๐ŸŒŽ Environment

  • Xcode: 13.0
  • Platform: all
  • Version/Release: 0.10.0
  • Dependency manager: any

๐Ÿ’ฌ Description

When using Matcher.RegexLike(:term), the provided value is not validated against the term.

Even though provider verification is still validating correctly, the consumer test should fail so that consumers don't test against invalid data.

๐Ÿฆถ Reproduction Steps

Steps to reproduce the behaviour:

  1. Write a pact test with a Matcher.RegexLike("28092021", term: #"\d{2}-\d{2}-\d{4}"#)
  2. Run pact test

๐Ÿค” Expected Results

The pact test fails indicating the provided value for the matcher did not match the set pattern.

๐Ÿ˜ฒ Actual Results

Pact test passes.

๐ŸŒณ Logs

Include any logs or command output if applicable...

๐Ÿ“„ Stack Traces

Include a stack trace if applicable...

๐Ÿค Relationships

  • Related PRs or Issues: #xxx, #yyy