From d31c635e6efc4013ea44a6676f832091c1763050 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 21 Jun 2024 11:49:51 +0200 Subject: chore: remove arrayElement(s) js only error (#2958) --- test/modules/helpers.spec.ts | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'test/modules') 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(() => -- cgit v1.2.3