Skip to content

Commit

Permalink
Merge pull request #66 from koblas/pl_nip_test
Browse files Browse the repository at this point in the history
fix: pl/nip added test case
  • Loading branch information
koblas authored Jul 2, 2023
2 parents 4f7762a + 7c8c600 commit e129cf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pl/nip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ describe('pl/nip', () => {
expect(result.isValid && result.compact).toEqual('8567346215');
});

it('validate:0000002000', () => {
const result = validate('0000002000');

expect(result.error).toBeInstanceOf(InvalidChecksum);
});

it('validate:12345678', () => {
const result = validate('12345678');

Expand Down
1 change: 1 addition & 0 deletions src/pl/nip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* a straightforward weighted checksum.
*
* Source
* https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Poland-TIN.pdf
*
* ENTITY
*/
Expand Down

0 comments on commit e129cf7

Please sign in to comment.