Skip to content

Commit

Permalink
test: add tests for defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Oct 26, 2023
1 parent 549f8e6 commit 23f63a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/modules/finance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 23f63a3

Please sign in to comment.