aboutsummaryrefslogtreecommitdiff
path: root/test/modules/internet.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/internet.spec.ts
parent160960b79719e1298668a7ebba390b30b8de1080 (diff)
downloadfaker-623d2741a4ca165596fad7fede2f850b6c08aa3a.tar.xz
faker-623d2741a4ca165596fad7fede2f850b6c08aa3a.zip
refactor!: remove deprecations (#3553)
Diffstat (limited to 'test/modules/internet.spec.ts')
-rw-r--r--test/modules/internet.spec.ts114
1 files changed, 0 insertions, 114 deletions
diff --git a/test/modules/internet.spec.ts b/test/modules/internet.spec.ts
index e690761b..9dd2e39d 100644
--- a/test/modules/internet.spec.ts
+++ b/test/modules/internet.spec.ts
@@ -2,7 +2,6 @@ import {
isEmail,
isFQDN,
isHexadecimal,
- isHexColor,
isIP,
isJWT,
isMACAddress,
@@ -67,20 +66,6 @@ describe('internet', () => {
});
});
- t.describe('userName', (t) => {
- t.it('noArgs')
- .it('with firstName option', { firstName: 'Jane' })
- .it('with lastName option', { lastName: 'Doe' })
- .it('with all option', { firstName: 'Jane', lastName: 'Doe' })
- .it('with Latin names', { firstName: 'Jane', lastName: 'Doe' })
- .it('with accented names', { firstName: 'Hélene', lastName: 'Müller' })
- .it('with Cyrillic names', {
- firstName: 'Фёдор',
- lastName: 'Достоевский',
- })
- .it('with Chinese names', { firstName: '大羽', lastName: '陳' });
- });
-
t.describe('username', (t) => {
t.it('noArgs')
.it('with firstName option', { firstName: 'Jane' })
@@ -133,18 +118,6 @@ describe('internet', () => {
t.it('noArgs').it('with options', { types: ['clientError'] });
});
- t.describe('color', (t) => {
- t.it('noArgs')
- .it('with blueBase option', { blueBase: 100 })
- .it('with greenBase option', { greenBase: 100 })
- .it('with redBase option', { redBase: 100 })
- .it('with all options', {
- redBase: 100,
- blueBase: 100,
- greenBase: 100,
- });
- });
-
t.describe('mac', (t) => {
t.it('noArgs')
.it('with separator', ':')
@@ -381,71 +354,6 @@ describe('internet', () => {
});
});
- describe('userName()', () => {
- it('should return a random userName', () => {
- const userName = faker.internet.userName();
-
- expect(userName).toBeTruthy();
- expect(userName).toBeTypeOf('string');
- expect(userName).toMatch(/\w/);
- });
-
- it('should return a random userName with given firstName', () => {
- const userName = faker.internet.userName({ firstName: 'Aiden' });
-
- expect(userName).toBeTruthy();
- expect(userName).toBeTypeOf('string');
- expect(userName).toMatch(/\w/);
- expect(userName).includes('Aiden');
- });
-
- it('should return a random userName with given firstName and lastName', () => {
- const userName = faker.internet.userName({
- firstName: 'Aiden',
- lastName: 'Harann',
- });
-
- expect(userName).toBeTruthy();
- expect(userName).toBeTypeOf('string');
- expect(userName).includes('Aiden');
- expect(userName).includes('Harann');
- expect(userName).toMatch(/^Aiden[._]Harann\d*/);
- });
-
- it('should strip accents', () => {
- const userName = faker.internet.userName({
- firstName: 'Adèle',
- lastName: 'Smith',
- });
- expect(userName).includes('Adele');
- expect(userName).includes('Smith');
- });
-
- it('should transliterate Cyrillic', () => {
- const userName = faker.internet.userName({
- firstName: 'Амос',
- lastName: 'Васильев',
- });
- expect(userName).includes('Amos');
- });
-
- it('should provide a fallback for Chinese etc', () => {
- const userName = faker.internet.userName({
- firstName: '大羽',
- lastName: '陳',
- });
- expect(userName).includes('hlzp8d');
- });
-
- it('should provide a fallback special unicode characters', () => {
- const userName = faker.internet.userName({
- firstName: '🐼',
- lastName: '❤️',
- });
- expect(userName).includes('2qt8');
- });
- });
-
describe('username()', () => {
it('should return a random username', () => {
const username = faker.internet.username();
@@ -838,28 +746,6 @@ describe('internet', () => {
});
});
- describe('color()', () => {
- it('should return a random hex value', () => {
- const color = faker.internet.color();
-
- expect(color).toBeTruthy();
- expect(color).toBeTypeOf('string');
- expect(color).toSatisfy(isHexColor);
- });
-
- it('should return a random hex value with given values', () => {
- const color = faker.internet.color({
- redBase: 100,
- greenBase: 100,
- blueBase: 100,
- });
-
- expect(color).toBeTruthy();
- expect(color).toBeTypeOf('string');
- expect(color).toSatisfy(isHexColor);
- });
- });
-
describe('mac()', () => {
it('should return a random MAC address with 6 hexadecimal digits', () => {
const mac = faker.internet.mac();