mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
test: improve test coverage (#6857)
This commit is contained in:
parent
edb4d00096
commit
f763ac13a9
22 changed files with 435 additions and 220 deletions
|
@ -60,9 +60,9 @@ export const DefaultSidebarItemsGenerator: SidebarItemsGenerator = async ({
|
|||
const doc = findDoc(docId);
|
||||
if (!doc) {
|
||||
throw new Error(
|
||||
`Can't find any doc with id=${docId}.\nAvailable doc ids:\n- ${Object.keys(
|
||||
docsById,
|
||||
).join('\n- ')}`,
|
||||
`Can't find any doc with ID ${docId}.
|
||||
Available doc IDs:
|
||||
- ${Object.keys(docsById).join('\n- ')}`,
|
||||
);
|
||||
}
|
||||
return doc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue