diff options
| author | renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> | 2022-08-16 09:05:35 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-16 09:05:35 +0000 |
| commit | 47f7fc9b1914ce6a78575522aa0168a53f6248e6 (patch) | |
| tree | 3c7663ebb628a47d3ebb6b9297996e5567671514 /test/scripts | |
| parent | 5dd30f33c0f3135a2d47c7d5f5a2d51c78774c0d (diff) | |
| download | faker-47f7fc9b1914ce6a78575522aa0168a53f6248e6.tar.xz faker-47f7fc9b1914ce6a78575522aa0168a53f6248e6.zip | |
chore(deps): update dependency typedoc-plugin-missing-exports to v1 (#1272)
* chore(deps): update dependency typedoc-plugin-missing-exports to v1
* docs: update api-docs generator
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'test/scripts')
| -rw-r--r-- | test/scripts/apidoc/examplesAndDeprecations.spec.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/scripts/apidoc/examplesAndDeprecations.spec.ts b/test/scripts/apidoc/examplesAndDeprecations.spec.ts index 5709189a..023ab77c 100644 --- a/test/scripts/apidoc/examplesAndDeprecations.spec.ts +++ b/test/scripts/apidoc/examplesAndDeprecations.spec.ts @@ -4,6 +4,8 @@ import type { DeclarationReflection, SignatureReflection } from 'typedoc'; import { ReflectionKind } from 'typedoc'; import type { SpyInstance } from 'vitest'; import { afterAll, beforeEach, describe, expect, it, vi } from 'vitest'; +import { selectDirectMethods } from '../../../scripts/apidoc/directMethods'; +import { selectApiModules } from '../../../scripts/apidoc/moduleMethods'; import { extractRawExamples, extractTagContent, @@ -27,16 +29,12 @@ const locales: Record<string, string> = { describe('examples and deprecations', () => { const project = loadProject(); - const directs: DeclarationReflection[] = project - .getChildrenByKind(ReflectionKind.Class) - .filter((ref) => ref.name === 'Faker')[0] - .getChildrenByKind(ReflectionKind.Property) - .filter((ref) => ['fake', 'unique'].includes(ref.name)); + const directs: DeclarationReflection[] = selectDirectMethods(project); - const modules: Record<string, DeclarationReflection[]> = project - .getChildrenByKind(ReflectionKind.Namespace)[0] - .getChildrenByKind(ReflectionKind.Class) - .filter((ref) => faker[ref.name.toLowerCase()] && ref.name !== 'Mersenne') + const modules: Record<string, DeclarationReflection[]> = selectApiModules( + project + ) + .filter((module) => module.name !== 'Mersenne') .reduce( (a, v) => ({ ...a, |
