diff options
| author | Shinigami <[email protected]> | 2023-08-06 14:24:10 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-06 14:24:10 +0200 |
| commit | 6b0cecae887cb22729e005e4268401b7c625a42a (patch) | |
| tree | ef05b81a903b44059bd03a4b6f00b694ac99fcdc /test | |
| parent | 8345e77b1a0633e55baaf7cf404819cd61629e63 (diff) | |
| download | faker-6b0cecae887cb22729e005e4268401b7c625a42a.tar.xz faker-6b0cecae887cb22729e005e4268401b7c625a42a.zip | |
chore(deps): update dependency prettier to v3 (#2260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/scripts/apidoc/signature.spec.ts | 4 | ||||
| -rw-r--r-- | test/scripts/apidoc/verify-jsdoc-tags.spec.ts | 28 | ||||
| -rw-r--r-- | test/support/seededRuns.ts | 4 |
3 files changed, 18 insertions, 18 deletions
diff --git a/test/scripts/apidoc/signature.spec.ts b/test/scripts/apidoc/signature.spec.ts index e80d78e6..75abf23b 100644 --- a/test/scripts/apidoc/signature.spec.ts +++ b/test/scripts/apidoc/signature.spec.ts @@ -18,8 +18,8 @@ describe('signature', () => { expect(Object.keys(methods)).toMatchSnapshot(); }); - it.each(Object.entries(methods))('%s', (name, signature) => { - const actual = analyzeSignature(signature, '', name); + it.each(Object.entries(methods))('%s', async (name, signature) => { + const actual = await analyzeSignature(signature, '', name); expect(actual).toMatchSnapshot(); }); diff --git a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts index 7123a150..557504c8 100644 --- a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts +++ b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts @@ -175,20 +175,20 @@ describe('verify JSDoc tags', () => { } }); - it('verify @param tags', () => { - analyzeSignature(signature, '', methodName).parameters.forEach( - (param) => { - const { name, description } = param; - const plainDescription = description - .replace(/<[^>]+>/g, '') - .trim(); - expect( - plainDescription, - `Expect param ${name} to have a description` - ).not.toBe(MISSING_DESCRIPTION); - assertDescription(description, true); - } - ); + it('verify @param tags', async () => { + ( + await analyzeSignature(signature, '', methodName) + ).parameters.forEach((param) => { + const { name, description } = param; + const plainDescription = description + .replace(/<[^>]+>/g, '') + .trim(); + expect( + plainDescription, + `Expect param ${name} to have a description` + ).not.toBe(MISSING_DESCRIPTION); + assertDescription(description, true); + }); }); it('verify @see tags', () => { diff --git a/test/support/seededRuns.ts b/test/support/seededRuns.ts index 74db7208..eaf4520a 100644 --- a/test/support/seededRuns.ts +++ b/test/support/seededRuns.ts @@ -69,7 +69,7 @@ type NoArgsMethodOf<TObjectType> = MethodOf<TObjectType> & */ export function seededTests< TFakerModule extends FakerModule, - TModule extends Record<string, Callable> = OnlyMethodsFaker[TFakerModule] + TModule extends Record<string, Callable> = OnlyMethodsFaker[TFakerModule], >( faker: Faker, module: TFakerModule, @@ -91,7 +91,7 @@ export function seededTests< */ class TestGenerator< TModuleName extends FakerModule, - TModule extends Record<string, Callable> = OnlyMethodsFaker[TModuleName] + TModule extends Record<string, Callable> = OnlyMethodsFaker[TModuleName], > { private readonly tested: Set<MethodOf<TModule>> = new Set(); private readonly module: TModule; |
