diff options
| author | Shinigami <[email protected]> | 2022-06-10 08:42:46 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-10 06:42:46 +0000 |
| commit | 26f89ea6013cda78fbd615fe7e44eedea2514b48 (patch) | |
| tree | 0966a1226eb545aa19c88a3042730aedb7ec4cc3 /test | |
| parent | a8e896f01bad53ee4eeae66656706d5ad18f97e3 (diff) | |
| download | faker-26f89ea6013cda78fbd615fe7e44eedea2514b48.tar.xz faker-26f89ea6013cda78fbd615fe7e44eedea2514b48.zip | |
test: improve internet tests (#1045)
Co-authored-by: xDivisionByZerox <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/internet.spec.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/internet.spec.ts b/test/internet.spec.ts index 313be914..1160538d 100644 --- a/test/internet.spec.ts +++ b/test/internet.spec.ts @@ -84,7 +84,7 @@ const seededRuns = [ }, ]; -const NON_SEEDED_BASED_RUN = 500; +const NON_SEEDED_BASED_RUN = 5; const functionNames = [ 'avatar', @@ -477,7 +477,10 @@ describe('internet', () => { expect(ua).toBeTruthy(); expect(ua).toBeTypeOf('string'); - // TODO @Shinigami92 2022-02-11: Make tests more strict + expect(ua.length).toBeGreaterThanOrEqual(1); + expect(ua).toMatch( + /^(([^\d]+\/[\dA-Za-z\.]+(\s\(.*\)))|([^\d]+\/[\dA-Za-z\.]+(\s\(.*\)*))(\s[^\d]+\/[\dA-Za-z\.]+(\s\(.*\)*))*)$/ + ); }); }); @@ -491,7 +494,6 @@ describe('internet', () => { }); it('should return a random hex value with given values', () => { - // TODO @Shinigami92 2022-02-11: Understand what's going on const color = faker.internet.color(100, 100, 100); expect(color).toBeTruthy(); |
