From 8dc5975a6f2a2944c05a340572b4bf2a6fe03f1b Mon Sep 17 00:00:00 2001 From: suyashgulati Date: Mon, 28 Oct 2024 18:26:20 +0530 Subject: [PATCH] Corrected animal.spec.ts --- test/modules/animal.spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/modules/animal.spec.ts b/test/modules/animal.spec.ts index 7ac332cbd4b..4fc95915533 100644 --- a/test/modules/animal.spec.ts +++ b/test/modules/animal.spec.ts @@ -22,7 +22,8 @@ describe('animal', () => { 'rabbit', 'rodent', 'snake', - 'type' + 'type', + 'petName' ); }); @@ -133,6 +134,13 @@ describe('animal', () => { expect(faker.definitions.animal.type).toContain(actual); }); }); + + describe('petName()', () => { + it('should return random value from type array', () => { + const actual = faker.animal.petName(); + expect(faker.definitions.animal.pet_name).toContain(actual); + }); + }); } ); });