mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-30 06:50:36 +02:00
chore: upgrade Prettier + regenerate lock file (#5611)
* Bump deps * Run prettier * Format docs * Minor refactor * Collapse objects * Fix type * Update lock file
This commit is contained in:
parent
4dbc458a22
commit
3f1f8255a2
70 changed files with 1534 additions and 1517 deletions
|
@ -575,12 +575,8 @@ describe('versioned website', () => {
|
|||
const {siteDir, plugin, pluginContentDir} = await loadSite();
|
||||
const content = await plugin.loadContent!();
|
||||
expect(content.loadedVersions.length).toEqual(4);
|
||||
const [
|
||||
currentVersion,
|
||||
version101,
|
||||
version100,
|
||||
versionWithSlugs,
|
||||
] = content.loadedVersions;
|
||||
const [currentVersion, version101, version100, versionWithSlugs] =
|
||||
content.loadedVersions;
|
||||
|
||||
// foo/baz.md only exists in version -1.0.0
|
||||
expect(findDocById(currentVersion, 'foo/baz')).toBeUndefined();
|
||||
|
@ -751,13 +747,8 @@ describe('versioned website (community)', () => {
|
|||
}
|
||||
|
||||
test('extendCli - docsVersion', async () => {
|
||||
const {
|
||||
siteDir,
|
||||
routeBasePath,
|
||||
sidebarPath,
|
||||
pluginId,
|
||||
plugin,
|
||||
} = await loadSite();
|
||||
const {siteDir, routeBasePath, sidebarPath, pluginId, plugin} =
|
||||
await loadSite();
|
||||
const mock = jest
|
||||
.spyOn(cliDocs, 'cliDocsVersionCommand')
|
||||
.mockImplementation();
|
||||
|
@ -1784,12 +1775,11 @@ describe('site with custom sidebar items generator', () => {
|
|||
});
|
||||
|
||||
test('sidebar is autogenerated according to a custom sidebarItemsGenerator', async () => {
|
||||
const customSidebarItemsGenerator: SidebarItemsGeneratorOption = async () => {
|
||||
return [
|
||||
const customSidebarItemsGenerator: SidebarItemsGeneratorOption =
|
||||
async () => [
|
||||
{type: 'doc', id: 'API/api-overview'},
|
||||
{type: 'doc', id: 'API/api-end'},
|
||||
];
|
||||
};
|
||||
|
||||
const {content} = await loadSite(customSidebarItemsGenerator);
|
||||
const version = content.loadedVersions[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue