From f47dfe5c58371b468c704cab7a7cd29f9a3e3379 Mon Sep 17 00:00:00 2001 From: Matt Mayer <152770+matthewmayer@users.noreply.github.com> Date: Fri, 5 Apr 2024 21:47:54 +0700 Subject: [PATCH] feat(animal): add more simple animals to animal.type() (#2786) --- src/locales/en/animal/type.ts | 49 +++++++++++++++---- src/modules/animal/index.ts | 2 +- .../modules/__snapshots__/animal.spec.ts.snap | 6 +-- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/src/locales/en/animal/type.ts b/src/locales/en/animal/type.ts index b1869f2e659..efaca735f3b 100644 --- a/src/locales/en/animal/type.ts +++ b/src/locales/en/animal/type.ts @@ -1,15 +1,46 @@ export default [ - 'dog', - 'cat', - 'snake', + 'bat', 'bear', - 'lion', - 'cetacean', - 'insect', - 'crocodilia', - 'cow', + 'bee', 'bird', + 'butterfly', + 'cat', + 'cow', + 'crocodile', + 'deer', + 'dog', + 'dolphin', + 'eagle', + 'elephant', 'fish', - 'rabbit', + 'flamingo', + 'fox', + 'frog', + 'gecko', + 'giraffe', + 'gorilla', + 'hamster', + 'hippopotamus', 'horse', + 'kangaroo', + 'koala', + 'lion', + 'monkey', + 'ostrich', + 'panda', + 'parrot', + 'peacock', + 'penguin', + 'polar bear', + 'rabbit', + 'rhinoceros', + 'sea lion', + 'shark', + 'snake', + 'squirrel', + 'tiger', + 'turtle', + 'whale', + 'wolf', + 'zebra', ]; diff --git a/src/modules/animal/index.ts b/src/modules/animal/index.ts index 7e5a51da4ad..5a885bbd739 100644 --- a/src/modules/animal/index.ts +++ b/src/modules/animal/index.ts @@ -194,7 +194,7 @@ export class AnimalModule extends ModuleBase { * Returns a random animal type. * * @example - * faker.animal.type() // 'crocodilia' + * faker.animal.type() // 'crocodile' * * @since 5.5.0 */ diff --git a/test/modules/__snapshots__/animal.spec.ts.snap b/test/modules/__snapshots__/animal.spec.ts.snap index 7124e5e9942..5e1162bbc07 100644 --- a/test/modules/__snapshots__/animal.spec.ts.snap +++ b/test/modules/__snapshots__/animal.spec.ts.snap @@ -28,7 +28,7 @@ exports[`animal > 42 > rodent 1`] = `"Famatina chinchilla rat"`; exports[`animal > 42 > snake 1`] = `"Grey-banded kingsnake"`; -exports[`animal > 42 > type 1`] = `"lion"`; +exports[`animal > 42 > type 1`] = `"frog"`; exports[`animal > 1211 > bear 1`] = `"Polar bear"`; @@ -58,7 +58,7 @@ exports[`animal > 1211 > rodent 1`] = `"Strong tuco-tuco"`; exports[`animal > 1211 > snake 1`] = `"Tiger pit viper"`; -exports[`animal > 1211 > type 1`] = `"horse"`; +exports[`animal > 1211 > type 1`] = `"turtle"`; exports[`animal > 1337 > bear 1`] = `"Sun bear"`; @@ -88,4 +88,4 @@ exports[`animal > 1337 > rodent 1`] = `"Crested porcupine"`; exports[`animal > 1337 > snake 1`] = `"Eastern coral snake"`; -exports[`animal > 1337 > type 1`] = `"bear"`; +exports[`animal > 1337 > type 1`] = `"eagle"`;