Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Oct 26, 2022
1 parent 0835d5f commit deda01a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ describe('sidebar', () => {
},
}),
);
await expect(plugin.loadContent!()).rejects.toThrowErrorMatchingSnapshot();
const content = await plugin.loadContent!();
const {actions} = createFakeActions(siteDir);
await expect(
plugin.contentLoaded!({content, actions, allContent: {}}),
).rejects.toThrowErrorMatchingSnapshot();
});

it('site with wrong sidebar file path', async () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/docusaurus-plugin-content-docs/src/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import type {
LastUpdateData,
VersionMetadata,
DocFrontMatter,
LoadedVersion,
FileChange,
} from '@docusaurus/plugin-content-docs';
import type {LoadContext} from '@docusaurus/types';
Expand Down Expand Up @@ -335,7 +334,7 @@ export function addDocNavigation(
docsBase: DocMetadataBase[],
sidebarsUtils: SidebarsUtils,
sidebarFilePath: string,
): LoadedVersion['docs'] {
): DocMetadata[] {
const docsById = createDocsByIdIndex(docsBase);

sidebarsUtils.checkSidebarsDocIds(
Expand Down

0 comments on commit deda01a

Please sign in to comment.