diff options
| author | Bobby <[email protected]> | 2022-11-07 10:58:05 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-07 15:58:05 +0000 |
| commit | 7e00d1741495f763f986b3a5daf40943db4abc7d (patch) | |
| tree | 84bf218e5cce1977fcd14d883689516f9f5befba /test | |
| parent | d3632585e01ce4590be57d2045f73f0b25a0f16d (diff) | |
| download | faker-7e00d1741495f763f986b3a5daf40943db4abc7d.tar.xz faker-7e00d1741495f763f986b3a5daf40943db4abc7d.zip | |
feat(person): add `zodiacSign()` (#182)
Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/__snapshots__/person.spec.ts.snap | 6 | ||||
| -rw-r--r-- | test/person.spec.ts | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/__snapshots__/person.spec.ts.snap b/test/__snapshots__/person.spec.ts.snap index 81181d32..a74ca00a 100644 --- a/test/__snapshots__/person.spec.ts.snap +++ b/test/__snapshots__/person.spec.ts.snap @@ -46,6 +46,8 @@ exports[`person > 42 > suffix > noArgs 1`] = `"III"`; exports[`person > 42 > suffix > with sex 1`] = `"III"`; +exports[`person > 42 > zodiacSign 1`] = `"Gemini"`; + exports[`person > 1211 > firstName > noArgs 1`] = `"Tito"`; exports[`person > 1211 > firstName > with sex 1`] = `"Percy"`; @@ -92,6 +94,8 @@ exports[`person > 1211 > suffix > noArgs 1`] = `"DVM"`; exports[`person > 1211 > suffix > with sex 1`] = `"DVM"`; +exports[`person > 1211 > zodiacSign 1`] = `"Capricorn"`; + exports[`person > 1337 > firstName > noArgs 1`] = `"Devyn"`; exports[`person > 1337 > firstName > with sex 1`] = `"Ray"`; @@ -137,3 +141,5 @@ exports[`person > 1337 > sexType 1`] = `"female"`; exports[`person > 1337 > suffix > noArgs 1`] = `"I"`; exports[`person > 1337 > suffix > with sex 1`] = `"I"`; + +exports[`person > 1337 > zodiacSign 1`] = `"Taurus"`; diff --git a/test/person.spec.ts b/test/person.spec.ts index 42b9e66f..757c6e8c 100644 --- a/test/person.spec.ts +++ b/test/person.spec.ts @@ -40,6 +40,8 @@ describe('person', () => { sex: 'female', }); }); + + t.it('zodiacSign'); }); describe(`random seeded tests for seed ${faker.seed()}`, () => { @@ -382,6 +384,16 @@ describe('person', () => { expect(faker.definitions.person.title.job).toContain(job); }); }); + + describe('zodiacSign()', () => { + it('returns a random zodiac sign', () => { + const sign = faker.person.zodiacSign(); + + expect(sign).toBeTypeOf('string'); + + expect(faker.definitions.person.western_zodiac_sign).toContain(sign); + }); + }); } }); }); |
