Skip to content

Commit

Permalink
chore: apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Nov 10, 2024
1 parent b684313 commit 0a759d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/modules/finance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ export class FinanceModule extends ModuleBase {
*
* @example
* faker.finance.transactionDescription()
* // 'invoice transaction at Kilback - Durgan using card ending with ***(...4316) for UAH 783.82 in account ***16168663'
* // 'invoice transaction at Kilback - Durgan using card ending with ************4316 for UAH 783.82 in account ***16168663'
*
* @since 5.1.0
*/
Expand All @@ -978,7 +978,7 @@ export class FinanceModule extends ModuleBase {
const company = this.faker.company.name();
const transactionType = this.transactionType();
const account = this.accountNumber();
const card = this.creditCardNumber().replaceAll(/(?<=.{4}).(?=.{2})/g, '*');
const card = this.creditCardNumber().replaceAll(/.(?=.{4})/g, '*');
const currency = this.currencyCode();

return `${transactionType} transaction at ${company} using card ending with ${card} for ${currency} ${amount} in account ***${account}`;
Expand Down
6 changes: 3 additions & 3 deletions test/modules/__snapshots__/finance.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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 3015**********19 for LYD 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"`;

Expand Down Expand Up @@ -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 4251*************58 for HNL 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"`;

Expand Down Expand Up @@ -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 4773*******13 for JMD 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"`;

0 comments on commit 0a759d3

Please sign in to comment.