-
-
Notifications
You must be signed in to change notification settings - Fork 932
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: fix full url to absolute conversion (#2101)
- Loading branch information
Showing
9 changed files
with
112 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`module > analyzeModule() > ModuleFakerJsLinkTest 1`] = ` | ||
{ | ||
"comment": "Description with a link to our [website](/) | ||
and [api docs](/api/).", | ||
"deprecated": undefined, | ||
} | ||
`; | ||
|
||
exports[`module > analyzeModule() > ModuleNextFakerJsLinkTest 1`] = ` | ||
{ | ||
"comment": "Description with a link to our [website](/) | ||
and [api docs](/api/).", | ||
"deprecated": undefined, | ||
} | ||
`; | ||
|
||
exports[`module > analyzeModule() > expected and actual modules are equal 1`] = ` | ||
[ | ||
"ModuleFakerJsLinkTest", | ||
"ModuleNextFakerJsLinkTest", | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Description with a link to our [website](https://fakerjs.dev/) | ||
* and [api docs](https://fakerjs.dev/api/). | ||
*/ | ||
export class ModuleFakerJsLinkTest {} | ||
|
||
/** | ||
* Description with a link to our [website](https://next.fakerjs.dev/) | ||
* and [api docs](https://next.fakerjs.dev/api/). | ||
*/ | ||
export class ModuleNextFakerJsLinkTest {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { beforeAll, describe, expect, it } from 'vitest'; | ||
import { initMarkdownRenderer } from '../../../scripts/apidoc/markdown'; | ||
import { analyzeModule } from '../../../scripts/apidoc/moduleMethods'; | ||
import * as ModuleTests from './module.example'; | ||
import { loadExampleModules } from './utils'; | ||
|
||
describe('module', () => { | ||
describe('analyzeModule()', () => { | ||
const modules = loadExampleModules(); | ||
|
||
beforeAll(initMarkdownRenderer); | ||
|
||
it('dummy dependency to rerun the test if the example changes', () => { | ||
expect(Object.keys(ModuleTests)).not.toEqual([]); | ||
}); | ||
|
||
it('expected and actual modules are equal', () => { | ||
expect(Object.keys(modules).sort()).toMatchSnapshot(); | ||
}); | ||
|
||
it.each(Object.entries(modules))('%s', (_, module) => { | ||
const actual = analyzeModule(module); | ||
|
||
expect(actual).toMatchSnapshot(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters