aboutsummaryrefslogtreecommitdiff
path: root/test/modules/finance.spec.ts
diff options
context:
space:
mode:
authorShinigami <[email protected]>2025-07-04 20:23:30 +0200
committerGitHub <[email protected]>2025-07-04 18:23:30 +0000
commit623d2741a4ca165596fad7fede2f850b6c08aa3a (patch)
treec05531e1f25bea9201925c0342d22e9a50f8946f /test/modules/finance.spec.ts
parent160960b79719e1298668a7ebba390b30b8de1080 (diff)
downloadfaker-623d2741a4ca165596fad7fede2f850b6c08aa3a.tar.xz
faker-623d2741a4ca165596fad7fede2f850b6c08aa3a.zip
refactor!: remove deprecations (#3553)
Diffstat (limited to 'test/modules/finance.spec.ts')
-rw-r--r--test/modules/finance.spec.ts49
1 files changed, 0 insertions, 49 deletions
diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts
index 69bcc3d1..d325f1b7 100644
--- a/test/modules/finance.spec.ts
+++ b/test/modules/finance.spec.ts
@@ -83,18 +83,6 @@ describe('finance', () => {
.it('with issuer option mastercard', { issuer: 'mastercard' });
});
- t.describe('maskedNumber', (t) => {
- t.it('noArgs')
- .it('with length', 5)
- .it('with length option', { length: 5 })
- .it('with length and parenthesis option', { length: 5, parens: false })
- .it('with length, parenthesis and ellipsis option', {
- length: 5,
- parens: false,
- ellipsis: true,
- });
- });
-
t.describe('bitcoinAddress', (t) => {
t.it('noArgs')
.it('with type option', { type: BitcoinAddressFamily.Legacy })
@@ -157,43 +145,6 @@ describe('finance', () => {
});
});
- describe('maskedNumber()', () => {
- it('should return contain parenthesis, ellipsis and have a length of 4 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({
- parens: false,
- ellipsis: false,
- });
-
- expect(
- mask,
- `The expected default mask length is ${expected} but it was ${mask.length}`
- ).toHaveLength(expected);
- });
-
- it('should set a specified length', () => {
- const expected = faker.number.int({ min: 1, max: 20 });
-
- const mask = faker.finance.maskedNumber({
- length: expected,
- parens: false,
- ellipsis: false,
- }); // the length of mask picks 4 if the random number generator picks 0
-
- expect(
- mask,
- `The expected default mask length is ${expected} but it was ${mask.length}`
- ).toHaveLength(expected);
- });
- });
-
describe('amount()', () => {
it('should use the default amounts when not passing arguments', () => {
const amount = faker.finance.amount();