diff options
Diffstat (limited to 'test/scripts')
| -rw-r--r-- | test/scripts/apidoc/__snapshots__/module.spec.ts.snap | 20 | ||||
| -rw-r--r-- | test/scripts/apidoc/module.example.ts | 14 |
2 files changed, 32 insertions, 2 deletions
diff --git a/test/scripts/apidoc/__snapshots__/module.spec.ts.snap b/test/scripts/apidoc/__snapshots__/module.spec.ts.snap index a7a2ec01..3afdab63 100644 --- a/test/scripts/apidoc/__snapshots__/module.spec.ts.snap +++ b/test/scripts/apidoc/__snapshots__/module.spec.ts.snap @@ -1,8 +1,16 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`module > analyzeModule() > ModuleDeprecationTest 1`] = ` +{ + "comment": "This is a description for a module with a code example.", + "deprecated": "Well, this is deprecated.", + "examples": undefined, +} +`; + exports[`module > analyzeModule() > ModuleExampleTest 1`] = ` { - "comment": "This is a description for a module with a code example", + "comment": "This is a description for a module with a code example.", "deprecated": undefined, "examples": "<div class=\\"language-ts\\"><button title=\\"Copy Code\\" class=\\"copy\\"></button><span class=\\"lang\\">ts</span><pre v-pre class=\\"shiki material-theme-palenight\\"><code><span class=\\"line\\"><span style=\\"color:#89DDFF\\">new</span><span style=\\"color:#BABED8\\"> </span><span style=\\"color:#82AAFF\\">ModuleExampleTest</span><span style=\\"color:#BABED8\\">()</span></span></code></pre> </div>", @@ -27,10 +35,20 @@ and [api docs](/api/).", } `; +exports[`module > analyzeModule() > ModuleSimpleTest 1`] = ` +{ + "comment": "A simple module without anything special.", + "deprecated": undefined, + "examples": undefined, +} +`; + exports[`module > analyzeModule() > expected and actual modules are equal 1`] = ` [ + "ModuleDeprecationTest", "ModuleExampleTest", "ModuleFakerJsLinkTest", "ModuleNextFakerJsLinkTest", + "ModuleSimpleTest", ] `; diff --git a/test/scripts/apidoc/module.example.ts b/test/scripts/apidoc/module.example.ts index 9671dc73..b3f43a86 100644 --- a/test/scripts/apidoc/module.example.ts +++ b/test/scripts/apidoc/module.example.ts @@ -1,4 +1,9 @@ /** + * A simple module without anything special. + */ +export class ModuleSimpleTest {} + +/** * Description with a link to our [website](https://fakerjs.dev/) * and [api docs](https://fakerjs.dev/api/). */ @@ -11,7 +16,14 @@ export class ModuleFakerJsLinkTest {} export class ModuleNextFakerJsLinkTest {} /** - * This is a description for a module with a code example + * This is a description for a module with a code example. + * + * @deprecated Well, this is deprecated. + */ +export class ModuleDeprecationTest {} + +/** + * This is a description for a module with a code example. * * @example * new ModuleExampleTest() |
