chore: do not print prototype in jest snapshot (#6908)

This commit is contained in:
Joshua Chen 2022-03-13 19:34:50 +08:00 committed by GitHub
parent 3a4b9b4c30
commit 8c1e518ba2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 1536 additions and 1519 deletions

View file

@ -1,43 +1,43 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`docsVersion first time versioning 1`] = `
Object {
"docs": Object {
"Guides": Array [
{
"docs": {
"Guides": [
"hello",
],
"Test": Array [
Object {
"items": Array [
"Test": [
{
"items": [
"foo/bar",
"foo/baz",
],
"label": "foo",
"type": "category",
},
Object {
"items": Array [
{
"items": [
"rootAbsoluteSlug",
"rootRelativeSlug",
"rootResolvedSlug",
"rootTryToEscapeSlug",
],
"label": "Slugs",
"link": Object {
"link": {
"type": "generated-index",
},
"type": "category",
},
Object {
{
"id": "headingAsTitle",
"type": "doc",
},
Object {
{
"href": "https://github.com",
"label": "Github",
"type": "link",
},
Object {
{
"id": "hello",
"type": "ref",
},
@ -47,12 +47,12 @@ Object {
`;
exports[`docsVersion not the first time versioning 1`] = `
Object {
"docs": Object {
"Guides": Array [
{
"docs": {
"Guides": [
"hello",
],
"Test": Array [
"Test": [
"foo/bar",
],
},
@ -60,8 +60,8 @@ Object {
`;
exports[`docsVersion second docs instance versioning 1`] = `
Object {
"community": Array [
{
"community": [
"team",
],
}

View file

@ -1,177 +1,177 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`simple site custom pagination 1`] = `
Object {
"pagination": Array [
Object {
{
"pagination": [
{
"id": "doc with space",
"next": Object {
"next": {
"permalink": "/docs/foo/bar",
"title": "Bar",
},
"prev": undefined,
},
Object {
{
"id": "foo/bar",
"next": undefined,
"prev": undefined,
},
Object {
{
"id": "foo/baz",
"next": Object {
"next": {
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
},
"prev": Object {
"prev": {
"permalink": "/docs/foo/bar",
"title": "Bar",
},
},
Object {
{
"id": "headingAsTitle",
"next": Object {
"next": {
"permalink": "/docs/",
"title": "Hello sidebar_label",
},
"prev": Object {
"prev": {
"permalink": "/docs/foo/bazSlug.html",
"title": "baz pagination_label",
},
},
Object {
{
"id": "hello",
"next": Object {
"next": {
"permalink": "/docs/ipsum",
"title": "ipsum",
},
"prev": Object {
"prev": {
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
},
},
Object {
{
"id": "ipsum",
"next": Object {
"next": {
"permalink": "/docs/lorem",
"title": "lorem",
},
"prev": Object {
"prev": {
"permalink": "/docs/",
"title": "Hello sidebar_label",
},
},
Object {
{
"id": "lorem",
"next": Object {
"next": {
"permalink": "/docs/rootAbsoluteSlug",
"title": "rootAbsoluteSlug",
},
"prev": Object {
"prev": {
"permalink": "/docs/ipsum",
"title": "ipsum",
},
},
Object {
{
"id": "rootAbsoluteSlug",
"next": Object {
"next": {
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
},
"prev": Object {
"prev": {
"permalink": "/docs/foo/bazSlug.html",
"title": "baz pagination_label",
},
},
Object {
{
"id": "rootRelativeSlug",
"next": Object {
"next": {
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
},
"prev": Object {
"prev": {
"permalink": "/docs/foo/bazSlug.html",
"title": "baz pagination_label",
},
},
Object {
{
"id": "rootResolvedSlug",
"next": Object {
"next": {
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
},
"prev": Object {
"prev": {
"permalink": "/docs/foo/bazSlug.html",
"title": "baz pagination_label",
},
},
Object {
{
"id": "rootTryToEscapeSlug",
"next": Object {
"next": {
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
},
"prev": Object {
"prev": {
"permalink": "/docs/foo/bazSlug.html",
"title": "baz pagination_label",
},
},
Object {
{
"id": "slugs/absoluteSlug",
"next": Object {
"next": {
"permalink": "/docs/slugs/relativeSlug",
"title": "relativeSlug",
},
"prev": Object {
"prev": {
"permalink": "/docs/rootTryToEscapeSlug",
"title": "rootTryToEscapeSlug",
},
},
Object {
{
"id": "slugs/relativeSlug",
"next": Object {
"next": {
"permalink": "/docs/slugs/hey/resolvedSlug",
"title": "resolvedSlug",
},
"prev": Object {
"prev": {
"permalink": "/docs/absoluteSlug",
"title": "absoluteSlug",
},
},
Object {
{
"id": "slugs/resolvedSlug",
"next": Object {
"next": {
"permalink": "/docs/tryToEscapeSlug",
"title": "tryToEscapeSlug",
},
"prev": Object {
"prev": {
"permalink": "/docs/slugs/relativeSlug",
"title": "relativeSlug",
},
},
Object {
{
"id": "slugs/tryToEscapeSlug",
"next": undefined,
"prev": Object {
"prev": {
"permalink": "/docs/slugs/hey/resolvedSlug",
"title": "resolvedSlug",
},
},
],
"sidebars": Object {
"defaultSidebar": Array [
Object {
"sidebars": {
"defaultSidebar": [
{
"id": "doc with space",
"type": "doc",
},
Object {
{
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "foo/bar",
"type": "doc",
},
Object {
{
"id": "foo/baz",
"type": "doc",
},
@ -180,56 +180,56 @@ Object {
"link": undefined,
"type": "category",
},
Object {
{
"id": "headingAsTitle",
"type": "doc",
},
Object {
{
"id": "hello",
"label": "Hello sidebar_label",
"type": "doc",
},
Object {
{
"id": "ipsum",
"type": "doc",
},
Object {
{
"id": "lorem",
"type": "doc",
},
Object {
{
"id": "rootAbsoluteSlug",
"type": "doc",
},
Object {
{
"id": "rootRelativeSlug",
"type": "doc",
},
Object {
{
"id": "rootResolvedSlug",
"type": "doc",
},
Object {
{
"id": "rootTryToEscapeSlug",
"type": "doc",
},
Object {
{
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "slugs/absoluteSlug",
"type": "doc",
},
Object {
{
"id": "slugs/relativeSlug",
"type": "doc",
},
Object {
{
"id": "slugs/resolvedSlug",
"type": "doc",
},
Object {
{
"id": "slugs/tryToEscapeSlug",
"type": "doc",
},

View file

@ -1,19 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`toGlobalDataVersion generates the right docs, sidebars, and metadata 1`] = `
Object {
"docs": Array [
Object {
{
"docs": [
{
"id": "main",
"path": "/current/main",
"sidebar": "tutorial",
},
Object {
{
"id": "doc",
"path": "/current/doc",
"sidebar": "tutorial",
},
Object {
{
"id": "/current/generated",
"path": "/current/generated",
"sidebar": "tutorial",
@ -24,16 +24,16 @@ Object {
"mainDocId": "main",
"name": "current",
"path": "/current",
"sidebars": Object {
"another": Object {
"link": Object {
"sidebars": {
"another": {
"link": {
"label": "Generated",
"path": "/current/generated",
},
},
"links": Object {},
"tutorial": Object {
"link": Object {
"links": {},
"tutorial": {
"link": {
"label": "main",
"path": "/current/main",
},

View file

@ -1,76 +1,76 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`getLoadedContentTranslationFiles returns translation files 1`] = `
Array [
Object {
"content": Object {
"sidebar.docs.category.Getting started": Object {
[
{
"content": {
"sidebar.docs.category.Getting started": {
"description": "The label for category Getting started in sidebar docs",
"message": "Getting started",
},
"sidebar.docs.category.Getting started.link.generated-index.description": Object {
"sidebar.docs.category.Getting started.link.generated-index.description": {
"description": "The generated-index page description for category Getting started in sidebar docs",
"message": "Getting started index description",
},
"sidebar.docs.category.Getting started.link.generated-index.title": Object {
"sidebar.docs.category.Getting started.link.generated-index.title": {
"description": "The generated-index page title for category Getting started in sidebar docs",
"message": "Getting started index title",
},
"sidebar.docs.link.Link label": Object {
"sidebar.docs.link.Link label": {
"description": "The label for link Link label in sidebar docs, linking to https://facebook.com",
"message": "Link label",
},
"version.label": Object {
"version.label": {
"description": "The label for version current",
"message": "current label",
},
},
"path": "current",
},
Object {
"content": Object {
"sidebar.docs.category.Getting started": Object {
{
"content": {
"sidebar.docs.category.Getting started": {
"description": "The label for category Getting started in sidebar docs",
"message": "Getting started",
},
"sidebar.docs.category.Getting started.link.generated-index.description": Object {
"sidebar.docs.category.Getting started.link.generated-index.description": {
"description": "The generated-index page description for category Getting started in sidebar docs",
"message": "Getting started index description",
},
"sidebar.docs.category.Getting started.link.generated-index.title": Object {
"sidebar.docs.category.Getting started.link.generated-index.title": {
"description": "The generated-index page title for category Getting started in sidebar docs",
"message": "Getting started index title",
},
"sidebar.docs.link.Link label": Object {
"sidebar.docs.link.Link label": {
"description": "The label for link Link label in sidebar docs, linking to https://facebook.com",
"message": "Link label",
},
"version.label": Object {
"version.label": {
"description": "The label for version 2.0.0",
"message": "2.0.0 label",
},
},
"path": "version-2.0.0",
},
Object {
"content": Object {
"sidebar.docs.category.Getting started": Object {
{
"content": {
"sidebar.docs.category.Getting started": {
"description": "The label for category Getting started in sidebar docs",
"message": "Getting started",
},
"sidebar.docs.category.Getting started.link.generated-index.description": Object {
"sidebar.docs.category.Getting started.link.generated-index.description": {
"description": "The generated-index page description for category Getting started in sidebar docs",
"message": "Getting started index description",
},
"sidebar.docs.category.Getting started.link.generated-index.title": Object {
"sidebar.docs.category.Getting started.link.generated-index.title": {
"description": "The generated-index page title for category Getting started in sidebar docs",
"message": "Getting started index title",
},
"sidebar.docs.link.Link label": Object {
"sidebar.docs.link.Link label": {
"description": "The label for link Link label in sidebar docs, linking to https://facebook.com",
"message": "Link label",
},
"version.label": Object {
"version.label": {
"description": "The label for version 1.0.0",
"message": "1.0.0 label",
},
@ -81,13 +81,13 @@ Array [
`;
exports[`translateLoadedContent returns translated loaded content 1`] = `
Object {
"loadedVersions": Array [
Object {
{
"loadedVersions": [
{
"contentPath": "any",
"contentPathLocalized": "any",
"docs": Array [
Object {
"docs": [
{
"description": "doc1 description",
"editUrl": "any",
"id": "doc1",
@ -103,7 +103,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc2 description",
"editUrl": "any",
"id": "doc2",
@ -119,7 +119,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc3 description",
"editUrl": "any",
"id": "doc3",
@ -135,7 +135,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc4 description",
"editUrl": "any",
"id": "doc4",
@ -151,7 +151,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc5 description",
"editUrl": "any",
"id": "doc5",
@ -172,31 +172,31 @@ Object {
"mainDocId": "",
"routePriority": undefined,
"sidebarFilePath": "any",
"sidebars": Object {
"docs": Array [
Object {
"sidebars": {
"docs": [
{
"collapsed": false,
"items": Array [
Object {
"items": [
{
"id": "doc1",
"type": "doc",
},
Object {
{
"id": "doc2",
"type": "doc",
},
Object {
{
"href": "https://facebook.com",
"label": "Link label (translated)",
"type": "link",
},
Object {
{
"id": "doc1",
"type": "ref",
},
],
"label": "Getting started (translated)",
"link": Object {
"link": {
"description": "Getting started index description (translated)",
"permalink": "/docs/category/getting-started-index-slug",
"slug": "/category/getting-started-index-slug",
@ -205,17 +205,17 @@ Object {
},
"type": "category",
},
Object {
{
"id": "doc3",
"type": "doc",
},
],
"otherSidebar": Array [
Object {
"otherSidebar": [
{
"id": "doc4",
"type": "doc",
},
Object {
{
"id": "doc5",
"type": "doc",
},
@ -225,11 +225,11 @@ Object {
"versionName": "current",
"versionPath": "/docs/",
},
Object {
{
"contentPath": "any",
"contentPathLocalized": "any",
"docs": Array [
Object {
"docs": [
{
"description": "doc1 description",
"editUrl": "any",
"id": "doc1",
@ -245,7 +245,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc2 description",
"editUrl": "any",
"id": "doc2",
@ -261,7 +261,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc3 description",
"editUrl": "any",
"id": "doc3",
@ -277,7 +277,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc4 description",
"editUrl": "any",
"id": "doc4",
@ -293,7 +293,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc5 description",
"editUrl": "any",
"id": "doc5",
@ -314,31 +314,31 @@ Object {
"mainDocId": "",
"routePriority": undefined,
"sidebarFilePath": "any",
"sidebars": Object {
"docs": Array [
Object {
"sidebars": {
"docs": [
{
"collapsed": false,
"items": Array [
Object {
"items": [
{
"id": "doc1",
"type": "doc",
},
Object {
{
"id": "doc2",
"type": "doc",
},
Object {
{
"href": "https://facebook.com",
"label": "Link label (translated)",
"type": "link",
},
Object {
{
"id": "doc1",
"type": "ref",
},
],
"label": "Getting started (translated)",
"link": Object {
"link": {
"description": "Getting started index description (translated)",
"permalink": "/docs/category/getting-started-index-slug",
"slug": "/category/getting-started-index-slug",
@ -347,17 +347,17 @@ Object {
},
"type": "category",
},
Object {
{
"id": "doc3",
"type": "doc",
},
],
"otherSidebar": Array [
Object {
"otherSidebar": [
{
"id": "doc4",
"type": "doc",
},
Object {
{
"id": "doc5",
"type": "doc",
},
@ -367,11 +367,11 @@ Object {
"versionName": "2.0.0",
"versionPath": "/docs/",
},
Object {
{
"contentPath": "any",
"contentPathLocalized": "any",
"docs": Array [
Object {
"docs": [
{
"description": "doc1 description",
"editUrl": "any",
"id": "doc1",
@ -387,7 +387,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc2 description",
"editUrl": "any",
"id": "doc2",
@ -403,7 +403,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc3 description",
"editUrl": "any",
"id": "doc3",
@ -419,7 +419,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc4 description",
"editUrl": "any",
"id": "doc4",
@ -435,7 +435,7 @@ Object {
"unversionedId": "any",
"version": "any",
},
Object {
{
"description": "doc5 description",
"editUrl": "any",
"id": "doc5",
@ -456,31 +456,31 @@ Object {
"mainDocId": "",
"routePriority": undefined,
"sidebarFilePath": "any",
"sidebars": Object {
"docs": Array [
Object {
"sidebars": {
"docs": [
{
"collapsed": false,
"items": Array [
Object {
"items": [
{
"id": "doc1",
"type": "doc",
},
Object {
{
"id": "doc2",
"type": "doc",
},
Object {
{
"href": "https://facebook.com",
"label": "Link label (translated)",
"type": "link",
},
Object {
{
"id": "doc1",
"type": "ref",
},
],
"label": "Getting started (translated)",
"link": Object {
"link": {
"description": "Getting started index description (translated)",
"permalink": "/docs/category/getting-started-index-slug",
"slug": "/category/getting-started-index-slug",
@ -489,17 +489,17 @@ Object {
},
"type": "category",
},
Object {
{
"id": "doc3",
"type": "doc",
},
],
"otherSidebar": Array [
Object {
"otherSidebar": [
{
"id": "doc4",
"type": "doc",
},
Object {
{
"id": "doc5",
"type": "doc",
},

View file

@ -1,54 +1,54 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`DefaultSidebarItemsGenerator generates complex nested sidebar 1`] = `
Array [
Object {
[
{
"id": "intro",
"type": "doc",
},
Object {
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "tutorial1",
"type": "doc",
},
Object {
{
"id": "tutorial2",
"type": "doc",
},
],
"label": "Tutorials",
"link": Object {
"link": {
"id": "tutorials-index",
"type": "doc",
},
"type": "category",
},
Object {
{
"collapsed": false,
"collapsible": undefined,
"customProps": Object {
"customProps": {
"description": "foo",
},
"items": Array [
Object {
"items": [
{
"className": "foo",
"id": "guide1",
"type": "doc",
},
Object {
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "nested-guide",
"type": "doc",
},
],
"label": "SubGuides (metadata file label)",
"link": Object {
"link": {
"description": "subGuides-description",
"slug": "subGuides-generated-index-slug",
"title": "subGuides-title",
@ -56,19 +56,19 @@ Array [
},
"type": "category",
},
Object {
{
"id": "guide2",
"type": "doc",
},
],
"label": "Guides",
"link": Object {
"link": {
"id": "guides-index",
"type": "doc",
},
"type": "category",
},
Object {
{
"id": "end",
"type": "doc",
},
@ -76,25 +76,25 @@ Array [
`;
exports[`DefaultSidebarItemsGenerator generates simple flat sidebar 1`] = `
Array [
Object {
[
{
"id": "doc3",
"type": "doc",
},
Object {
{
"id": "doc4",
"type": "doc",
},
Object {
{
"id": "doc1",
"label": "doc1 sidebar label",
"type": "doc",
},
Object {
{
"id": "doc2",
"type": "doc",
},
Object {
{
"id": "doc5",
"type": "doc",
},
@ -102,33 +102,33 @@ Array [
`;
exports[`DefaultSidebarItemsGenerator generates subfolder sidebar 1`] = `
Array [
Object {
[
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "doc8",
"type": "doc",
},
Object {
{
"id": "doc7",
"type": "doc",
},
],
"label": "subsubsubfolder3 (_category_.json label)",
"link": Object {
"link": {
"id": "doc1",
"type": "doc",
},
"type": "category",
},
Object {
{
"className": "bar",
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "doc6",
"type": "doc",
},
@ -136,19 +136,19 @@ Array [
"label": "subsubsubfolder2 (_category_.yml label)",
"type": "category",
},
Object {
{
"id": "doc1",
"type": "doc",
},
Object {
{
"id": "doc4",
"type": "doc",
},
Object {
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "doc5",
"type": "doc",
},
@ -160,45 +160,45 @@ Array [
`;
exports[`DefaultSidebarItemsGenerator respects custom isCategoryIndex 1`] = `
Array [
Object {
[
{
"id": "intro",
"type": "doc",
},
Object {
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "tutorial1",
"type": "doc",
},
Object {
{
"id": "tutorial2",
"type": "doc",
},
],
"label": "Tutorials",
"link": Object {
"link": {
"id": "tutorials-index",
"type": "doc",
},
"type": "category",
},
Object {
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"className": "foo",
"id": "guide1",
"type": "doc",
},
Object {
{
"id": "guide2",
"type": "doc",
},
Object {
{
"id": "not-guides-index",
"type": "doc",
},
@ -210,40 +210,40 @@ Array [
`;
exports[`DefaultSidebarItemsGenerator uses explicit link over the index/readme.{md,mdx} naming convention 1`] = `
Array [
Object {
[
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "parent/doc2",
"type": "doc",
},
Object {
{
"id": "parent/doc1",
"type": "doc",
},
],
"label": "Category label",
"link": Object {
"link": {
"id": "parent/doc3",
"type": "doc",
},
"type": "category",
},
Object {
{
"collapsed": undefined,
"collapsible": undefined,
"items": Array [
Object {
"items": [
{
"id": "parent/doc4",
"type": "doc",
},
Object {
{
"id": "parent/doc6",
"type": "doc",
},
Object {
{
"id": "parent/doc5",
"type": "doc",
},

View file

@ -1,13 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`loadSidebars sidebars link 1`] = `
Object {
"docs": Array [
Object {
{
"docs": [
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"href": "https://github.com",
"label": "category",
"type": "link",
@ -22,17 +22,17 @@ Object {
`;
exports[`loadSidebars sidebars with category.collapsed property 1`] = `
Object {
"docs": Array [
Object {
{
"docs": [
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "doc1",
"type": "doc",
},
@ -46,15 +46,15 @@ Object {
"link": undefined,
"type": "category",
},
Object {
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "doc2",
"type": "doc",
},
@ -73,13 +73,13 @@ Object {
`;
exports[`loadSidebars sidebars with category.collapsed property at first level 1`] = `
Object {
"docs": Array [
Object {
{
"docs": [
{
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "doc1",
"type": "doc",
},
@ -88,11 +88,11 @@ Object {
"link": undefined,
"type": "category",
},
Object {
{
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "doc2",
"type": "doc",
},
@ -106,41 +106,41 @@ Object {
`;
exports[`loadSidebars sidebars with deep level of category 1`] = `
Object {
"docs": Array [
Object {
{
"docs": [
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "a",
"type": "doc",
},
Object {
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "c",
"type": "doc",
},
Object {
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "d",
"type": "doc",
},
Object {
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "e",
"type": "doc",
},
@ -159,7 +159,7 @@ Object {
"link": undefined,
"type": "category",
},
Object {
{
"id": "f",
"type": "doc",
},
@ -178,13 +178,13 @@ Object {
`;
exports[`loadSidebars sidebars with first level not a category 1`] = `
Object {
"docs": Array [
Object {
{
"docs": [
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "greeting",
"type": "doc",
},
@ -193,7 +193,7 @@ Object {
"link": undefined,
"type": "category",
},
Object {
{
"id": "api",
"type": "doc",
},
@ -202,26 +202,26 @@ Object {
`;
exports[`loadSidebars sidebars with known sidebar item type 1`] = `
Object {
"docs": Array [
Object {
{
"docs": [
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "foo/bar",
"type": "doc",
},
Object {
{
"id": "foo/baz",
"type": "doc",
},
Object {
{
"href": "https://github.com",
"label": "Github",
"type": "link",
},
Object {
{
"id": "hello",
"type": "ref",
},
@ -230,11 +230,11 @@ Object {
"link": undefined,
"type": "category",
},
Object {
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "hello",
"type": "doc",
},
@ -248,13 +248,13 @@ Object {
`;
exports[`loadSidebars undefined path 1`] = `
Object {
"defaultSidebar": Array [
Object {
{
"defaultSidebar": [
{
"collapsed": true,
"collapsible": true,
"items": Array [
Object {
"items": [
{
"id": "bar",
"type": "doc",
},

View file

@ -1,15 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`normalization normalizes shorthands 1`] = `
Object {
"sidebar": Array [
Object {
"items": Array [
Object {
{
"sidebar": [
{
"items": [
{
"id": "doc1",
"type": "doc",
},
Object {
{
"id": "doc2",
"type": "doc",
},
@ -17,15 +17,15 @@ Object {
"label": "Category",
"type": "category",
},
Object {
"items": Array [
Object {
"items": Array [
Object {
{
"items": [
{
"items": [
{
"id": "doc3",
"type": "doc",
},
Object {
{
"id": "doc4",
"type": "doc",
},
@ -33,13 +33,13 @@ Object {
"label": "Subcategory 1",
"type": "category",
},
Object {
"items": Array [
Object {
{
"items": [
{
"id": "doc5",
"type": "doc",
},
Object {
{
"id": "doc6",
"type": "doc",
},
@ -56,20 +56,20 @@ Object {
`;
exports[`normalization normalizes shorthands 2`] = `
Object {
"sidebar": Array [
Object {
{
"sidebar": [
{
"href": "https://google.com",
"label": "Google",
"type": "link",
},
Object {
"items": Array [
Object {
{
"items": [
{
"id": "doc1",
"type": "doc",
},
Object {
{
"id": "doc2",
"type": "doc",
},
@ -77,13 +77,13 @@ Object {
"label": "Category 1",
"type": "category",
},
Object {
"items": Array [
Object {
{
"items": [
{
"id": "doc3",
"type": "doc",
},
Object {
{
"id": "doc4",
"type": "doc",
},

View file

@ -1,13 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`postProcess corrects collapsed state inconsistencies 1`] = `
Object {
"sidebar": Array [
Object {
{
"sidebar": [
{
"collapsed": false,
"collapsible": false,
"items": Array [
Object {
"items": [
{
"id": "foo",
"type": "doc",
},
@ -21,13 +21,13 @@ Object {
`;
exports[`postProcess corrects collapsed state inconsistencies 2`] = `
Object {
"sidebar": Array [
Object {
{
"sidebar": [
{
"collapsed": false,
"collapsible": false,
"items": Array [
Object {
"items": [
{
"id": "foo",
"type": "doc",
},
@ -41,13 +41,13 @@ Object {
`;
exports[`postProcess corrects collapsed state inconsistencies 3`] = `
Object {
"sidebar": Array [
Object {
{
"sidebar": [
{
"collapsed": false,
"collapsible": false,
"items": Array [
Object {
"items": [
{
"id": "foo",
"type": "doc",
},
@ -61,14 +61,14 @@ Object {
`;
exports[`postProcess transforms category without subitems 1`] = `
Object {
"sidebar": Array [
Object {
{
"sidebar": [
{
"href": "version/generated/permalink",
"label": "Category",
"type": "link",
},
Object {
{
"id": "doc ID",
"label": "Category 2",
"type": "doc",