diff options
| author | renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> | 2023-09-10 20:42:01 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-10 20:42:01 +0200 |
| commit | a8e608085fa0d199d4236734c34a5f000667b56e (patch) | |
| tree | 3199b4f5e6fa036f74aaeb0374cfb7a2da056de4 /docs/guide | |
| parent | 769a4892cb56f293cb784cf87d45d3883a234002 (diff) | |
| download | faker-a8e608085fa0d199d4236734c34a5f000667b56e.tar.xz faker-a8e608085fa0d199d4236734c34a5f000667b56e.zip | |
chore(deps): update dependency prettier to v3.0.3 (#2375)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Shinigami92 <[email protected]>
Diffstat (limited to 'docs/guide')
| -rw-r--r-- | docs/guide/frameworks.md | 4 | ||||
| -rw-r--r-- | docs/guide/localization.md | 2 | ||||
| -rw-r--r-- | docs/guide/upgrading.md | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/docs/guide/frameworks.md b/docs/guide/frameworks.md index e7151638..4dec853f 100644 --- a/docs/guide/frameworks.md +++ b/docs/guide/frameworks.md @@ -13,8 +13,8 @@ Simply crop that line out for a Jest integration. These frameworks work about exactly as you would expect with Faker. Here's a minimal example: ```ts -import { describe, it, expect } from 'vitest'; import { faker } from '@faker-js/faker/locale/en'; +import { describe, expect, it } from 'vitest'; describe('reverse array', () => { it('should reverse the array', () => { @@ -36,8 +36,8 @@ 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 { afterEach, describe, it, expect } from 'vitest'; import { faker } from '@faker-js/faker/locale/en'; +import { afterEach, describe, expect, it } from 'vitest'; // We might want other tests to *not* be seeded. This will re-seed our faker instance after each test. afterEach(() => { diff --git a/docs/guide/localization.md b/docs/guide/localization.md index 44392f97..44f5f2fe 100644 --- a/docs/guide/localization.md +++ b/docs/guide/localization.md @@ -44,7 +44,7 @@ If our built-in faker instances don't satisfy your needs, you can build your own ```ts import type { LocaleDefinition } from '@faker-js/faker'; -import { Faker, de_CH, de, en, base } from '@faker-js/faker'; +import { base, de, de_CH, en, Faker } from '@faker-js/faker'; const customLocale: LocaleDefinition = { title: 'My custom locale', diff --git a/docs/guide/upgrading.md b/docs/guide/upgrading.md index 85b8fe6f..85b75268 100644 --- a/docs/guide/upgrading.md +++ b/docs/guide/upgrading.md @@ -58,7 +58,7 @@ const b = customFaker.internet.emoji(); **New** ```ts -import { Faker, de_CH, de, en, base } from '@faker-js/faker'; +import { base, de, de_CH, en, Faker } from '@faker-js/faker'; // same as fakerDE_CH export const customFaker = new Faker({ @@ -110,7 +110,7 @@ This will also give you detailed information which data are missing. If you want to check for data you can either use `entry in faker.definitions.category` or use `faker.rawDefinitions.category?.entry` instead. ```ts -import { Faker, fakerES, es } from '@faker-js/faker'; +import { es, Faker, fakerES } from '@faker-js/faker'; const fakerES_noFallbacks = new Faker({ locale: [es], @@ -125,7 +125,7 @@ fakerES_noFallbacks.music.songName(); // throws a FakerError This also has an impact on data that aren't applicable to a locale, for example Hong Kong (`en_HK`) doesn't use ZIP codes/postcodes. ```ts -import { fakerEN_US, fakerEN_HK } from '@faker-js/faker'; +import { fakerEN_HK, fakerEN_US } from '@faker-js/faker'; fakerEN_US.location.zipCode(); // 90210 fakerEN_HK.location.zipCode(); // throws a FakerError ``` |
