diff options
| author | Dale Seo <[email protected]> | 2023-08-26 08:20:15 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-26 12:20:15 +0000 |
| commit | b103c63e72738c0437e60519d735a4ee1936954d (patch) | |
| tree | 8ade91e05306338e3d43ef1be5aa7f7714ff77b9 /docs | |
| parent | e0d422a03f6b07134741dab4724f01456cecc0dc (diff) | |
| download | faker-b103c63e72738c0437e60519d735a4ee1936954d.tar.xz faker-b103c63e72738c0437e60519d735a4ee1936954d.zip | |
docs(guide): replace deprecated faker.name with faker.person (#2345)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/guide/frameworks.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/guide/frameworks.md b/docs/guide/frameworks.md index cd2a3a20..e7151638 100644 --- a/docs/guide/frameworks.md +++ b/docs/guide/frameworks.md @@ -18,8 +18,8 @@ import { faker } from '@faker-js/faker/locale/en'; describe('reverse array', () => { it('should reverse the array', () => { - const title = faker.name.jobTitle(); - const name = faker.name.fullName(); + const title = faker.person.jobTitle(); + const name = faker.person.fullName(); const animal = faker.animal.bear(); const array = [title, name, animal]; @@ -36,7 +36,7 @@ These are especially useful in tests that are meant to be deterministic, such as - [Snapshots in Jest](https://jestjs.io/docs/snapshot-testing) ```ts -import { describe, it, expect } from 'vitest'; +import { afterEach, describe, it, expect } from 'vitest'; import { faker } from '@faker-js/faker/locale/en'; // We might want other tests to *not* be seeded. This will re-seed our faker instance after each test. @@ -48,8 +48,8 @@ describe('reverse array', () => { it('should reverse the array', () => { // Seed our faker instance with some static number. faker.seed(1234); - const title = faker.name.jobTitle(); - const name = faker.name.fullName(); + const title = faker.person.jobTitle(); + const name = faker.person.fullName(); const animal = faker.animal.bear(); const array = [title, name, animal]; |
