faker
faker copied to clipboard
refactor(locale): fix en_CA postcode patterns
Fixes #1416
- #1416
Related to #3234
- #3234
Blocked by #3223 and #3233
- #3223
- #3233
Fixes the pattern using the regex provided in the issue:
https://github.com/faker-js/faker/issues/1416#issuecomment-1271663875
Workaround until this PR is merged:
const zipCode = faker.helpers.fake('{{helpers.fromRegExp("[ABCEGHJ-NPRSTVXY][0-9][ABCEGHJ-NPRSTV-Z] [0-9][ABCEGHJ-NPRSTV-Z][0-9]")}}');
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.96%. Comparing base (
b9930dc) to head (9fc5193).
Additional details and impacted files
@@ Coverage Diff @@
## refactor/location/zipCode/fake #3235 +/- ##
===============================================================
Coverage 99.96% 99.96%
===============================================================
Files 2805 2805
Lines 217143 217126 -17
Branches 969 968 -1
===============================================================
- Hits 217066 217049 -17
Misses 77 77
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/locales/en_CA/location/postcode_pattern.ts | 100.00% <100.00%> (ø) |