diff options
| author | ST-DDT <[email protected]> | 2023-10-11 20:44:51 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-11 20:44:51 +0200 |
| commit | 201d6e30f536c2c1f934270d2c97239522df1926 (patch) | |
| tree | b4652b01518a8bfeebc51d01a070e0163e94794f /test/scripts | |
| parent | 6cb5aa25f676c7f43fd543e1738e71f54ea5fc6f (diff) | |
| download | faker-201d6e30f536c2c1f934270d2c97239522df1926.tar.xz faker-201d6e30f536c2c1f934270d2c97239522df1926.zip | |
infra(unicorn): no-array-for-each (#2461)
Diffstat (limited to 'test/scripts')
| -rw-r--r-- | test/scripts/apidoc/signature.debug.ts | 4 | ||||
| -rw-r--r-- | test/scripts/apidoc/verify-jsdoc-tags.spec.ts | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/scripts/apidoc/signature.debug.ts b/test/scripts/apidoc/signature.debug.ts index a9ec8fd0..52b6976a 100644 --- a/test/scripts/apidoc/signature.debug.ts +++ b/test/scripts/apidoc/signature.debug.ts @@ -12,10 +12,10 @@ const methods = loadExampleMethods(); initMarkdownRenderer() .then(() => { - Object.entries(methods).forEach(([name, method]) => { + for (const [name, method] of Object.entries(methods)) { console.log('Analyzing:', name); const result = analyzeSignature(method, '', method.name); console.log('Result:', result); - }); + } }) .catch(console.error); diff --git a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts index 5b8f5680..64cbcdb4 100644 --- a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts +++ b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts @@ -176,9 +176,9 @@ describe('verify JSDoc tags', () => { }); it('verify @param tags', async () => { - ( + for (const param of ( await analyzeSignature(signature, '', methodName) - ).parameters.forEach((param) => { + ).parameters) { const { name, description } = param; const plainDescription = description .replace(/<[^>]+>/g, '') @@ -188,11 +188,11 @@ describe('verify JSDoc tags', () => { `Expect param ${name} to have a description` ).not.toBe(MISSING_DESCRIPTION); assertDescription(description, true); - }); + } }); it('verify @see tags', () => { - extractSeeAlsos(signature).forEach((link) => { + for (const link of extractSeeAlsos(signature)) { if (link.startsWith('faker.')) { // Expected @see faker.xxx.yyy() expect(link, 'Expect method reference to contain ()').toContain( @@ -203,7 +203,7 @@ describe('verify JSDoc tags', () => { ); expect(allowedReferences).toContain(link.replace(/\(.*/, '')); } - }); + } }); it('verify @since tag', () => { |
