chore: spell-check test files (#6903)

This commit is contained in:
Joshua Chen 2022-03-12 15:24:56 +08:00 committed by GitHub
parent f6baaa6b75
commit 76cb012209
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 184 additions and 155 deletions

View file

@ -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",

View file

@ -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',
},
},
},

View file

@ -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,
);
});

View file

@ -83,6 +83,7 @@ describe('normalization', () => {
sidebar: 'item',
}),
).toThrowErrorMatchingInlineSnapshot(
// cSpell:ignore msidebar
`"Invalid sidebar items collection \`\\"item\\"\` in sidebar sidebar: it must either be an array of sidebar items or a shorthand notation (which doesn't contain a \`type\` property). See https://docusaurus.io/docs/sidebar/items for all valid syntaxes."`,
);
});