aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2022-12-27 00:30:18 +0700
committerGitHub <[email protected]>2022-12-26 17:30:18 +0000
commit3793ec1baffbf0d41b3f49fa94380ffd4048b054 (patch)
tree4e3f044dfd88b9b8636f8670685c5896b1c2ed75 /test
parentec53c4507ad724704d792db633889f9eb66bea67 (diff)
downloadfaker-3793ec1baffbf0d41b3f49fa94380ffd4048b054.tar.xz
faker-3793ec1baffbf0d41b3f49fa94380ffd4048b054.zip
docs(datatype): allow markdown in @see links (#1667)
Diffstat (limited to 'test')
-rw-r--r--test/scripts/apidoc/__snapshots__/signature.spec.ts.snap21
-rw-r--r--test/scripts/apidoc/signature.example.ts10
2 files changed, 31 insertions, 0 deletions
diff --git a/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap b/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap
index 46bb3eca..1a3612da 100644
--- a/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap
+++ b/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap
@@ -33,6 +33,7 @@ exports[`signature > analyzeSignature() > expected and actual methods are equal
"methodWithDeprecated",
"methodWithExample",
"methodWithMultipleSeeMarkers",
+ "methodWithMultipleSeeMarkersAndBackticks",
"methodWithSinceMarker",
"multiParamMethod",
"noParamMethod",
@@ -153,6 +154,26 @@ exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkers 1`] = `
}
`;
+exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkersAndBackticks 1`] = `
+{
+ "deprecated": false,
+ "description": "<p>Test with multiple see markers and backticks.</p>
+",
+ "examples": "<div class=\\"language-ts\\"><button title=\\"Copy Code\\" class=\\"copy\\"></button><span class=\\"lang\\">ts</span><pre v-pre class=\\"shiki material-palenight\\"><code><span class=\\"line\\"><span style=\\"color:#A6ACCD\\">faker</span><span style=\\"color:#89DDFF\\">.</span><span style=\\"color:#82AAFF\\">methodWithMultipleSeeMarkersAndBackticks</span><span style=\\"color:#A6ACCD\\">(): number</span></span>
+<span class=\\"line\\"></span></code></pre>
+</div>",
+ "name": "methodWithMultipleSeeMarkersAndBackticks",
+ "parameters": [],
+ "returns": "number",
+ "seeAlsos": [
+ "test.apidoc.methodWithExample() with parameter <code>foo</code>.",
+ "test.apidoc.methodWithDeprecated() with parameter <code>bar</code> and <code>baz</code>.",
+ ],
+ "since": "",
+ "title": "Method With Multiple See Markers And Backticks",
+}
+`;
+
exports[`signature > analyzeSignature() > methodWithSinceMarker 1`] = `
{
"deprecated": false,
diff --git a/test/scripts/apidoc/signature.example.ts b/test/scripts/apidoc/signature.example.ts
index 43407ab9..83bf5ce3 100644
--- a/test/scripts/apidoc/signature.example.ts
+++ b/test/scripts/apidoc/signature.example.ts
@@ -242,6 +242,16 @@ export class SignatureTest {
}
/**
+ * Test with multiple see markers and backticks.
+ *
+ * @see test.apidoc.methodWithExample() with parameter `foo`.
+ * @see test.apidoc.methodWithDeprecated() with parameter `bar` and `baz`.
+ */
+ methodWithMultipleSeeMarkersAndBackticks(): number {
+ return 0;
+ }
+
+ /**
* Test with since marker.
*
* @since 1.0.0