From 23f63a3c994ffbc60e8e93c346ad526856fe8a5c Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Thu, 26 Oct 2023 21:35:57 +0200 Subject: [PATCH] test: add tests for defaults --- test/modules/finance.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts index a0cfbb2ecef..70f42c8f829 100644 --- a/test/modules/finance.spec.ts +++ b/test/modules/finance.spec.ts @@ -217,6 +217,12 @@ describe('finance', () => { }); describe('maskedNumber()', () => { + it('should return contain parenthesis, ellipsis and have a length by default', () => { + const actual = faker.finance.maskedNumber(); + + expect(actual).toMatch(/\(\.{3}\d{4}\)/); + }); + it('should set a default length', () => { const expected = 4; // default account mask length const mask = faker.finance.maskedNumber({