Skip to content

Commit

Permalink
feat(animal): add more simple animals to animal.type() (#2786)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmayer committed Apr 5, 2024
1 parent 5860783 commit f47dfe5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 13 deletions.
49 changes: 40 additions & 9 deletions src/locales/en/animal/type.ts
Original file line number Diff line number Diff line change
@@ -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',
];
2 changes: 1 addition & 1 deletion src/modules/animal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
6 changes: 3 additions & 3 deletions test/modules/__snapshots__/animal.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"`;

Expand Down Expand Up @@ -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"`;

Expand Down Expand Up @@ -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"`;

0 comments on commit f47dfe5

Please sign in to comment.