Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex generator conflicts with regex #1843

Open
timvahlbrock opened this issue Dec 9, 2024 · 0 comments
Open

Regex generator conflicts with regex #1843

timvahlbrock opened this issue Dec 9, 2024 · 0 comments

Comments

@timvahlbrock
Copy link
Contributor

If handed a regex in a string matcher, but no example value, Pact will generate an example using a corresponding library. If a dot in a regular expression (any character) is used it may result in a newline being included in the generated example value. However, Pact will then complain that the example value does not match the regular expression. Maybe there is a flag missing?

Example: /.{4,4}/ generates an example value of

Ạ湎
樨

which does match the regex, but Pact still throws the exception.

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

No branches or pull requests

1 participant