aboutsummaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-11-21 00:23:16 +0100
committerGitHub <[email protected]>2023-11-20 23:23:16 +0000
commit808aa82f3f86a0b25f272c0c1760115a0920b614 (patch)
tree94a4485ebd3933b710b9280fe8f68c2d041d4adb /test/scripts
parent96195673448e9b56ea330a1d02ff63374a11ca8b (diff)
downloadfaker-808aa82f3f86a0b25f272c0c1760115a0920b614.tar.xz
faker-808aa82f3f86a0b25f272c0c1760115a0920b614.zip
docs: consistent @see jsdoc tags (#2473)
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/apidoc/verify-jsdoc-tags.spec.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts
index 29a487a5..efb1919b 100644
--- a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts
+++ b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts
@@ -274,6 +274,24 @@ describe('verify JSDoc tags', () => {
expect(link, 'Expect method reference to contain ()').toContain(
')'
);
+ expect(
+ link,
+ "Expect method reference to have a ': ' after the parenthesis"
+ ).toContain('): ');
+ expect(
+ link,
+ 'Expect method reference to have a description starting with a capital letter'
+ ).toMatch(/\): [A-Z]/);
+ expect(
+ link,
+ 'Expect method reference to start with a standard description phrase'
+ ).toMatch(
+ /\): (?:For generating |For more information about |For using |For the replacement method)/
+ );
+ expect(
+ link,
+ 'Expect method reference to have a description ending with a dot'
+ ).toMatch(/\.$/);
expect(allowedReferences).toContain(link.replace(/\(.*/, ''));
}
}