From 3793ec1baffbf0d41b3f49fa94380ffd4048b054 Mon Sep 17 00:00:00 2001 From: Matt Mayer Date: Tue, 27 Dec 2022 00:30:18 +0700 Subject: docs(datatype): allow markdown in @see links (#1667) --- .../apidoc/__snapshots__/signature.spec.ts.snap | 21 +++++++++++++++++++++ test/scripts/apidoc/signature.example.ts | 10 ++++++++++ 2 files changed, 31 insertions(+) (limited to 'test/scripts') 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": "

Test with multiple see markers and backticks.

+", + "examples": "
ts
faker.methodWithMultipleSeeMarkersAndBackticks(): number
+
+
", + "name": "methodWithMultipleSeeMarkersAndBackticks", + "parameters": [], + "returns": "number", + "seeAlsos": [ + "test.apidoc.methodWithExample() with parameter foo.", + "test.apidoc.methodWithDeprecated() with parameter bar and baz.", + ], + "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 @@ -241,6 +241,16 @@ export class SignatureTest { return 0; } + /** + * 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. * -- cgit v1.2.3