diff options
| author | ST-DDT <[email protected]> | 2024-06-21 11:49:51 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-21 09:49:51 +0000 |
| commit | d31c635e6efc4013ea44a6676f832091c1763050 (patch) | |
| tree | b648d4ab8b9d8e16f18cfd7b5c01c8fd89d90ffd /test/modules | |
| parent | d6924f7fbb9403d106022f58a1bda3b159e88ae6 (diff) | |
| download | faker-d31c635e6efc4013ea44a6676f832091c1763050.tar.xz faker-d31c635e6efc4013ea44a6676f832091c1763050.zip | |
chore: remove arrayElement(s) js only error (#2958)
Diffstat (limited to 'test/modules')
| -rw-r--r-- | test/modules/helpers.spec.ts | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/test/modules/helpers.spec.ts b/test/modules/helpers.spec.ts index 09f26467..3582799f 100644 --- a/test/modules/helpers.spec.ts +++ b/test/modules/helpers.spec.ts @@ -190,15 +190,6 @@ describe('helpers', () => { expect(actual).toBe('hello'); }); - it('should throw with no arguments', () => { - // @ts-expect-error: `arrayElement` without arguments is not supported in TypeScript - expect(() => faker.helpers.arrayElement()).toThrow( - new FakerError( - 'Calling `faker.helpers.arrayElement()` without arguments is no longer supported.' - ) - ); - }); - it('should throw on an empty array', () => { expect(() => faker.helpers.arrayElement([])).toThrow( new FakerError('Cannot get value from empty dataset.') @@ -468,15 +459,6 @@ describe('helpers', () => { } ); - it('should throw with no arguments', () => { - // @ts-expect-error: `arrayElements` without arguments is not supported in TypeScript - expect(() => faker.helpers.arrayElements()).toThrow( - new FakerError( - 'Calling `faker.helpers.arrayElements()` without arguments is no longer supported.' - ) - ); - }); - describe('should not throw on an array with nullish elements', () => { it.each(['', 0, undefined, null, false])('%s', (nullishValue) => { expect(() => |
