mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 05:28:43 +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
|
@ -21,10 +21,6 @@ function getCategoryGeneratedIndexMetadata({
|
|||
}): CategoryGeneratedIndexMetadata {
|
||||
const {sidebarName, previous, next} =
|
||||
sidebarsUtils.getCategoryGeneratedIndexNavigation(category.link.permalink);
|
||||
if (!sidebarName) {
|
||||
throw new Error('unexpected');
|
||||
}
|
||||
|
||||
return {
|
||||
title: category.link.title ?? category.label,
|
||||
description: category.link.description,
|
||||
|
@ -32,7 +28,7 @@ function getCategoryGeneratedIndexMetadata({
|
|||
keywords: category.link.keywords,
|
||||
slug: category.link.slug,
|
||||
permalink: category.link.permalink,
|
||||
sidebar: sidebarName,
|
||||
sidebar: sidebarName!,
|
||||
previous: toNavigationLink(previous, docsById),
|
||||
next: toNavigationLink(next, docsById),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue