aboutsummaryrefslogtreecommitdiff
path: root/test/modules/helpers.spec.ts
diff options
context:
space:
mode:
authorDivisionByZero <[email protected]>2024-06-30 19:06:31 +0200
committerGitHub <[email protected]>2024-06-30 19:06:31 +0200
commite21fcaf2398dfd9aed54136524fabd39866dfca4 (patch)
tree1c91c07cfd517f935540becee692b2dae70304e0 /test/modules/helpers.spec.ts
parent92a2f178343f4413bd6d782a7957eda86aa1b7b8 (diff)
downloadfaker-e21fcaf2398dfd9aed54136524fabd39866dfca4.tar.xz
faker-e21fcaf2398dfd9aed54136524fabd39866dfca4.zip
refactor(locale): group person entries by gender (#2938)
Diffstat (limited to 'test/modules/helpers.spec.ts')
-rw-r--r--test/modules/helpers.spec.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/modules/helpers.spec.ts b/test/modules/helpers.spec.ts
index c41b004b..13c66f37 100644
--- a/test/modules/helpers.spec.ts
+++ b/test/modules/helpers.spec.ts
@@ -1024,9 +1024,11 @@ describe('helpers', () => {
expect(faker.definitions.location.state).toContain(
faker.helpers.fake('{{address.state}}')
);
- expect(faker.definitions.person.first_name).toContain(
- faker.helpers.fake('{{name.firstName}}')
- );
+ expect([
+ ...(faker.definitions.person.first_name.female ?? []),
+ ...(faker.definitions.person.first_name.generic ?? []),
+ ...(faker.definitions.person.first_name.male ?? []),
+ ]).toContain(faker.helpers.fake('{{name.firstName}}'));
});
it('should not trim whitespace', () => {