diff options
| author | ST-DDT <[email protected]> | 2023-11-07 23:06:53 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-07 23:06:53 +0100 |
| commit | 6f977f6b0122dc1761152d4eb7922fed63dc87c0 (patch) | |
| tree | 2101c67a4a6b4ff3cbbcfdcdddf65e3f3695b4dd /test/modules | |
| parent | 6df70bce16500ab74a37f932f2e17a08f297430b (diff) | |
| download | faker-6f977f6b0122dc1761152d4eb7922fed63dc87c0.tar.xz faker-6f977f6b0122dc1761152d4eb7922fed63dc87c0.zip | |
refactor(string): remove arbitrary limit from sample (#2497)
Diffstat (limited to 'test/modules')
| -rw-r--r-- | test/modules/datatype.spec.ts | 6 | ||||
| -rw-r--r-- | test/modules/string.spec.ts | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/test/modules/datatype.spec.ts b/test/modules/datatype.spec.ts index db676fdc..b4d154f4 100644 --- a/test/modules/datatype.spec.ts +++ b/test/modules/datatype.spec.ts @@ -330,12 +330,6 @@ describe('datatype', () => { expect(generatedString).toBe(''); expect(generatedString).toHaveLength(0); }); - - it('should return string with length of 2^20 if bigger length value is passed', () => { - const overMaxValue = Math.pow(2, 28); - const generatedString = faker.datatype.string(overMaxValue); - expect(generatedString).toHaveLength(Math.pow(2, 20)); - }); }); describe('boolean', () => { diff --git a/test/modules/string.spec.ts b/test/modules/string.spec.ts index a4f7ecef..e82fa93f 100644 --- a/test/modules/string.spec.ts +++ b/test/modules/string.spec.ts @@ -724,12 +724,6 @@ describe('string', () => { expect(generatedString).toHaveLength(0); }); - it('should return string with length of 2^20 if bigger length value is passed', () => { - const overMaxValue = 2 ** 28; - const generatedString = faker.string.sample(overMaxValue); - expect(generatedString).toHaveLength(2 ** 20); - }); - it('should return string with a specific length', () => { const length = 1337; const generatedString = faker.string.sample(length); |
