aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLeyla Jähnig <[email protected]>2022-08-18 21:31:28 +0200
committerGitHub <[email protected]>2022-08-18 21:31:28 +0200
commita372c8cf595d8f5eba8e7e4cf09b8c6f4b7d3d17 (patch)
treed5d7796ba7942bbc5bd7002219af90d7cdc14277 /test
parent93ef876e54886c2b13afda2e69e1b656dbbdc1f0 (diff)
downloadfaker-a372c8cf595d8f5eba8e7e4cf09b8c6f4b7d3d17.tar.xz
faker-a372c8cf595d8f5eba8e7e4cf09b8c6f4b7d3d17.zip
test(internet): fix username expecting numbers with length 2 (#1284)
Diffstat (limited to 'test')
-rw-r--r--test/internet.spec.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/internet.spec.ts b/test/internet.spec.ts
index f8ccbb14..1dbccc23 100644
--- a/test/internet.spec.ts
+++ b/test/internet.spec.ts
@@ -101,7 +101,7 @@ describe('internet', () => {
expect(prefix).includes('Aiden.Harann55');
expect(prefix).toMatch(
- /^(Aiden\.Harann55((\d{2})|([._][A-Za-z]*(\d{2})?)))/
+ /^(Aiden\.Harann55((\d{1,2})|([._][A-Za-z]*(\d{1,2})?)))/
);
expect(faker.definitions.internet.free_email).toContain(suffix);
});
@@ -117,7 +117,7 @@ describe('internet', () => {
expect(prefix).includes('Aiden');
expect(prefix).toMatch(
- /^Aiden((\d{2})|([._]Harann\d{2})|([._](Harann)))/
+ /^Aiden((\d{1,2})|([._]Harann\d{1,2})|([._](Harann)))/
);
expect(faker.definitions.internet.free_email).toContain(suffix);
});
@@ -147,7 +147,7 @@ describe('internet', () => {
const [prefix, suffix] = email.split('@');
expect(prefix).toMatch(
- /^Mike((\d{2})|([.!#$%&'*+-/=?^_`{|}~]Smith\d{2})|([.!#$%&'*+-/=?^_`{|}~]Smith))/
+ /^Mike((\d{1,2})|([.!#$%&'*+-/=?^_`{|}~]Smith\d{1,2})|([.!#$%&'*+-/=?^_`{|}~]Smith))/
);
expect(faker.definitions.internet.free_email).toContain(suffix);
});
@@ -251,7 +251,7 @@ describe('internet', () => {
expect(username).toBeTypeOf('string');
expect(username).includes('Aiden');
expect(username).toMatch(
- /^Aiden((\d{2})|([._]Harann\d{2})|([._](Harann)))/
+ /^Aiden((\d{1,2})|([._]Harann\d{1,2})|([._](Harann)))/
);
});
});