aboutsummaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2022-08-05 08:38:40 +0200
committerGitHub <[email protected]>2022-08-05 06:38:40 +0000
commit23d86aa0289a00f49b2ac6d3d7562f5c5398d1f8 (patch)
tree688b42e131524b8389dfee202b1aa7f2f4f77348 /test/scripts
parent9426e3a9d707ee3c936f0757d080e40c8c850b3a (diff)
downloadfaker-23d86aa0289a00f49b2ac6d3d7562f5c5398d1f8.tar.xz
faker-23d86aa0289a00f49b2ac6d3d7562f5c5398d1f8.zip
test: validate @see contents (#1231)
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/apidoc/examplesAndDeprecations.spec.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/scripts/apidoc/examplesAndDeprecations.spec.ts b/test/scripts/apidoc/examplesAndDeprecations.spec.ts
index 9eb10d39..5709189a 100644
--- a/test/scripts/apidoc/examplesAndDeprecations.spec.ts
+++ b/test/scripts/apidoc/examplesAndDeprecations.spec.ts
@@ -111,6 +111,15 @@ describe('examples and deprecations', () => {
expect(spy).not.toHaveBeenCalled();
}
}
+
+ // Verify @see tag
+ extractTagContent('@see', signature).forEach((link) => {
+ if (link.startsWith('faker')) {
+ // Expected @see faker.xxx.yyy()
+ expect(link, 'Expect method reference to contain ()').toContain('(');
+ expect(link, 'Expect method reference to contain ()').toContain(')');
+ }
+ });
});
});
});