aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2024-11-12 09:15:03 +0100
committerGitHub <[email protected]>2024-11-12 09:15:03 +0100
commitcb4b77c04f4d4a706819a6f34ff8378afec6523e (patch)
tree5553bdcf0d965e6aa81bd4ccb5e1218dcfa7ae35 /test
parent9abaed1061b5fa9dc9f93822162610105a788296 (diff)
downloadfaker-cb4b77c04f4d4a706819a6f34ff8378afec6523e.tar.xz
faker-cb4b77c04f4d4a706819a6f34ff8378afec6523e.zip
refactor(finance): deprecate maskedNumber for removal (#3201)
Diffstat (limited to 'test')
-rw-r--r--test/modules/__snapshots__/finance.spec.ts.snap6
-rw-r--r--test/modules/finance.spec.ts3
2 files changed, 6 insertions, 3 deletions
diff --git a/test/modules/__snapshots__/finance.spec.ts.snap b/test/modules/__snapshots__/finance.spec.ts.snap
index 1312820a..5ac691cf 100644
--- a/test/modules/__snapshots__/finance.spec.ts.snap
+++ b/test/modules/__snapshots__/finance.spec.ts.snap
@@ -84,7 +84,7 @@ exports[`finance > 42 > pin > with length option 1`] = `"3975110867"`;
exports[`finance > 42 > routingNumber 1`] = `"397511082"`;
-exports[`finance > 42 > transactionDescription 1`] = `"deposit transaction at Reynolds, Miller and Crist using card ending with ***(...1135) for KES 374.54 in account ***08670982"`;
+exports[`finance > 42 > transactionDescription 1`] = `"deposit transaction at Reynolds, Miller and Crist using card ending with ************4719 for LYD 374.54 in account ***08670982"`;
exports[`finance > 42 > transactionType 1`] = `"invoice"`;
@@ -172,7 +172,7 @@ exports[`finance > 1211 > pin > with length option 1`] = `"9829667368"`;
exports[`finance > 1211 > routingNumber 1`] = `"982966738"`;
-exports[`finance > 1211 > transactionDescription 1`] = `"payment transaction at Fahey, Zieme and Osinski using card ending with ***(...8825) for CRC 928.52 in account ***73687684"`;
+exports[`finance > 1211 > transactionDescription 1`] = `"payment transaction at Fahey, Zieme and Osinski using card ending with ***************2758 for HNL 928.52 in account ***73687684"`;
exports[`finance > 1211 > transactionType 1`] = `"withdrawal"`;
@@ -260,6 +260,6 @@ exports[`finance > 1337 > pin > with length option 1`] = `"2124352971"`;
exports[`finance > 1337 > routingNumber 1`] = `"212435298"`;
-exports[`finance > 1337 > transactionDescription 1`] = `"invoice transaction at Gottlieb - Koelpin using card ending with ***(...9477) for HUF 262.02 in account ***52971361"`;
+exports[`finance > 1337 > transactionDescription 1`] = `"invoice transaction at Gottlieb - Koelpin using card ending with *********6413 for JMD 262.02 in account ***52971361"`;
exports[`finance > 1337 > transactionType 1`] = `"invoice"`;
diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts
index ee19b17a..eab50d94 100644
--- a/test/modules/finance.spec.ts
+++ b/test/modules/finance.spec.ts
@@ -158,6 +158,7 @@ describe('finance', () => {
describe('maskedNumber()', () => {
it('should return contain parenthesis, ellipsis and have a length of 4 by default', () => {
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const actual = faker.finance.maskedNumber();
expect(actual).toMatch(/\(\.{3}\d{4}\)/);
@@ -165,6 +166,7 @@ describe('finance', () => {
it('should set a default length', () => {
const expected = 4; // default account mask length
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const mask = faker.finance.maskedNumber({
parens: false,
ellipsis: false,
@@ -179,6 +181,7 @@ describe('finance', () => {
it('should set a specified length', () => {
const expected = faker.number.int({ min: 1, max: 20 });
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const mask = faker.finance.maskedNumber({
length: expected,
parens: false,