Skip to content

Commit

Permalink
🚑 fix: Update Cyprus regex pattern to match new format and add valid …
Browse files Browse the repository at this point in the history
…code in test fixtures (#9)

* 🚑 fix: Update Cyprus regex pattern to match new format and add valid code in test fixtures.

* ci: install without package-lock.json

---------

Co-authored-by: Mokhtar <[email protected]>
  • Loading branch information
Hossam4M and 0x0blu authored Apr 4, 2024
1 parent 1e83b08 commit f13886a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm install --no-package-lock
- run: npm test
2 changes: 1 addition & 1 deletion src/countries/cyprus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const cyprus: CountryConfig = {
},
rules: {
multipliers: {},
regex: [/^(CY)([0-59]\d{7}[A-Z])$/],
regex: [/^(CY)(\d{8}[A-Z])$/],
},
};

Expand Down
3 changes: 2 additions & 1 deletion test/countries-fixtures/cyprus.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export const valid = [
'CY90000448S',
'CY90002066W',
'CY99000027S',
'CY99200002N'
'CY99200002N',
'CY60029000O',
];

export const validOnlyByFormat = ['CY12000000C', 'CY12000001C', 'CY12000002C', 'CY12000003C'];
Expand Down

0 comments on commit f13886a

Please sign in to comment.