mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-19 11:12:36 +02:00
chore: spell-check test files (#6903)
This commit is contained in:
parent
f6baaa6b75
commit
76cb012209
59 changed files with 184 additions and 155 deletions
|
@ -49,9 +49,9 @@ Array [
|
|||
],
|
||||
"label": "SubGuides (metadata file label)",
|
||||
"link": Object {
|
||||
"description": "subguides-description",
|
||||
"slug": "subguides-generated-index-slug",
|
||||
"title": "subguides-title",
|
||||
"description": "subGuides-description",
|
||||
"slug": "subGuides-generated-index-slug",
|
||||
"title": "subGuides-title",
|
||||
"type": "generated-index",
|
||||
},
|
||||
"type": "category",
|
||||
|
|
|
@ -131,9 +131,9 @@ describe('DefaultSidebarItemsGenerator', () => {
|
|||
label: 'SubGuides (metadata file label)',
|
||||
link: {
|
||||
type: 'generated-index',
|
||||
slug: 'subguides-generated-index-slug',
|
||||
title: 'subguides-title',
|
||||
description: 'subguides-description',
|
||||
slug: 'subGuides-generated-index-slug',
|
||||
title: 'subGuides-title',
|
||||
description: 'subGuides-description',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -43,7 +43,7 @@ describe('loadSidebars', () => {
|
|||
expect(result).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('sidebars shorthand and longform lead to exact same sidebar', async () => {
|
||||
it('sidebars shorthand and longhand lead to exact same sidebar', async () => {
|
||||
const sidebarPath1 = path.join(fixtureDir, 'sidebars-category.js');
|
||||
const sidebarPath2 = path.join(
|
||||
fixtureDir,
|
||||
|
@ -81,8 +81,8 @@ describe('loadSidebars', () => {
|
|||
expect(result).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('unexisting path', async () => {
|
||||
await expect(loadSidebars('badpath', params)).resolves.toEqual(
|
||||
it('nonexistent path', async () => {
|
||||
await expect(loadSidebars('bad/path', params)).resolves.toEqual(
|
||||
DisabledSidebars,
|
||||
);
|
||||
});
|
||||
|
|
|
@ -83,6 +83,7 @@ describe('normalization', () => {
|
|||
sidebar: 'item',
|
||||
}),
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
// cSpell:ignore msidebar
|
||||
`"Invalid sidebar items collection [36m\`\\"item\\"\`[39m in sidebar [34m[1msidebar[22m[39m: it must either be an array of sidebar items or a shorthand notation (which doesn't contain a [36m\`type\`[39m property). See [36m[4mhttps://docusaurus.io/docs/sidebar/items[24m[39m for all valid syntaxes."`,
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue