diff --git a/src/pl/nip.spec.ts b/src/pl/nip.spec.ts index 7003e40..11ff364 100644 --- a/src/pl/nip.spec.ts +++ b/src/pl/nip.spec.ts @@ -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'); diff --git a/src/pl/nip.ts b/src/pl/nip.ts index 66093a4..fd5a34d 100644 --- a/src/pl/nip.ts +++ b/src/pl/nip.ts @@ -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 */