diff options
| author | ST-DDT <[email protected]> | 2023-10-07 11:05:58 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-07 09:05:58 +0000 |
| commit | eb2b18b8a0e64eded3731bae4204d2925dbef3e7 (patch) | |
| tree | 0ace6e551d0a75fae07e6acef448b48691589cdc /test/modules/finance.spec.ts | |
| parent | c80c035333e3c832c46dc7dcac5c86a289829e0d (diff) | |
| download | faker-eb2b18b8a0e64eded3731bae4204d2925dbef3e7.tar.xz faker-eb2b18b8a0e64eded3731bae4204d2925dbef3e7.zip | |
infra(eslint): enable no-useless-escape eslint rule (#2434)
Diffstat (limited to 'test/modules/finance.spec.ts')
| -rw-r--r-- | test/modules/finance.spec.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts index 97bcdcc7..a0cfbb2e 100644 --- a/test/modules/finance.spec.ts +++ b/test/modules/finance.spec.ts @@ -279,7 +279,7 @@ describe('finance', () => { expect( amount, 'The expected match should not include a currency symbol' - ).toMatch(/^[0-9\.]+$/); + ).toMatch(/^[0-9.]+$/); }); it('should handle negative amounts', () => { @@ -456,7 +456,7 @@ describe('finance', () => { it('should return a correct credit card number when issuer provided', () => { //TODO: implement checks for each format with regexp const visa = faker.finance.creditCardNumber('visa'); - expect(visa).toMatch(/^4(([0-9]){12}|([0-9]){3}(\-([0-9]){4}){3})$/); + expect(visa).toMatch(/^4(([0-9]){12}|([0-9]){3}(-([0-9]){4}){3})$/); expect(visa).toSatisfy(luhnCheck); const mastercard = faker.finance.creditCardNumber('mastercard'); @@ -490,7 +490,7 @@ describe('finance', () => { it('should return custom formatted strings', () => { let number = faker.finance.creditCardNumber('###-###-##L'); - expect(number).toMatch(/^\d{3}\-\d{3}\-\d{3}$/); + expect(number).toMatch(/^\d{3}-\d{3}-\d{3}$/); expect(number).toSatisfy(luhnCheck); number = faker.finance.creditCardNumber('234[5-9]#{999}L'); |
