You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stringMatching generates based on the regular expression, but doesn't provide a way to set a min or max length on the generated strings.
Motivation
Sometimes you want to test specific lengths of a string matching a regex, but modifying a regular expression to have a specific min and/or max length can be pretty hard and confusing. It would be a lot easier to just be able to pass minLength and maxLength like the string arbitrary.
Example
constnameRegex=/^[a-z]+$/// Test different lengths without having to modify regexfc.stringMatching(nameRegex,{minLength: 10})fc.stringMatching(nameRegex,{maxLength: 10})fc.stringMatching(nameRegex,{minLength: 5,maxLength: 10})
The text was updated successfully, but these errors were encountered:
🚀 Feature Request
stringMatching
generates based on the regular expression, but doesn't provide a way to set a min or max length on the generated strings.Motivation
Sometimes you want to test specific lengths of a string matching a regex, but modifying a regular expression to have a specific min and/or max length can be pretty hard and confusing. It would be a lot easier to just be able to pass
minLength
andmaxLength
like thestring
arbitrary.Example
The text was updated successfully, but these errors were encountered: