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

fix: basic wildcard range handling + add more tests #3322

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Dec 3, 2024

Partially fixes #3302


This PR tries to fix the wildcard pattern support. Now, quantified '.' and case insensitive patterns are working.
However, due to limitations of the current implementation, the same isn't possible for non-quantified characters ('.' vs '.{1}').

So the main focus of this PR is adding more tests.

I'm not sure if the partial fix improves things, or whether we should start with just the tests and rewrite the entire method later.

See the linked issue for more problems with the current implementation.

@ST-DDT ST-DDT added c: bug Something isn't working p: 1-normal Nothing urgent m: helpers Something is referring to the helpers module labels Dec 3, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Dec 3, 2024
@ST-DDT ST-DDT requested review from a team December 3, 2024 20:28
@ST-DDT ST-DDT self-assigned this Dec 3, 2024
Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 35d41f5
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/6757746aa7f2b50008574047
😎 Deploy Preview https://deploy-preview-3322.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (8b2976f) to head (35d41f5).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3322   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files        2806     2806           
  Lines      217076   217087   +11     
  Branches      968      970    +2     
=======================================
+ Hits       217003   217018   +15     
+ Misses         73       69    -4     
Files with missing lines Coverage Δ
src/modules/helpers/index.ts 96.78% <100.00%> (+0.06%) ⬆️

... and 1 file with indirect coverage changes

@import-brain import-brain changed the title fix: basic wirdcard range handling + add more tests fix: basic wildcard range handling + add more tests Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working m: helpers Something is referring to the helpers module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

. is not working in faker.helpers.fromRegExp
2 participants