aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2024-04-05 21:47:54 +0700
committerGitHub <[email protected]>2024-04-05 16:47:54 +0200
commitf47dfe5c58371b468c704cab7a7cd29f9a3e3379 (patch)
tree8f7feb0a3d1882d4d134b79686bb4fcd756acba7
parent5860783e81d392bc235408b697668ab8ecdd2d7c (diff)
downloadfaker-f47dfe5c58371b468c704cab7a7cd29f9a3e3379.tar.xz
faker-f47dfe5c58371b468c704cab7a7cd29f9a3e3379.zip
feat(animal): add more simple animals to animal.type() (#2786)
-rw-r--r--src/locales/en/animal/type.ts49
-rw-r--r--src/modules/animal/index.ts2
-rw-r--r--test/modules/__snapshots__/animal.spec.ts.snap6
3 files changed, 44 insertions, 13 deletions
diff --git a/src/locales/en/animal/type.ts b/src/locales/en/animal/type.ts
index b1869f2e..efaca735 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 7e5a51da..5a885bbd 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 7124e5e9..5e1162bb 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"`;