mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-20 18:17:51 +02:00
improve props tests
This commit is contained in:
parent
1796741129
commit
3b58fb8781
1 changed files with 10 additions and 10 deletions
|
@ -146,6 +146,8 @@ describe('toSidebarsProp', () => {
|
||||||
docs: [
|
docs: [
|
||||||
fromPartial({
|
fromPartial({
|
||||||
id: 'doc-id-1',
|
id: 'doc-id-1',
|
||||||
|
permalink: '/doc-1',
|
||||||
|
title: 'Doc 1 title',
|
||||||
frontMatter: {},
|
frontMatter: {},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
@ -165,9 +167,8 @@ describe('toSidebarsProp', () => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'ref',
|
type: 'ref',
|
||||||
label: 'Doc 1 ref bis',
|
|
||||||
// no key on purpose
|
|
||||||
id: 'doc-id-1',
|
id: 'doc-id-1',
|
||||||
|
// no label/key on purpose
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
@ -184,9 +185,8 @@ describe('toSidebarsProp', () => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'doc',
|
type: 'doc',
|
||||||
label: 'Doc 1 bis',
|
|
||||||
// no key on purpose
|
|
||||||
id: 'doc-id-1',
|
id: 'doc-id-1',
|
||||||
|
// no label/key on purpose
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -209,7 +209,7 @@ describe('toSidebarsProp', () => {
|
||||||
"className": undefined,
|
"className": undefined,
|
||||||
"customProps": undefined,
|
"customProps": undefined,
|
||||||
"docId": "doc-id-1",
|
"docId": "doc-id-1",
|
||||||
"href": undefined,
|
"href": "/doc-1",
|
||||||
"key": "ref-with-doc-id-1",
|
"key": "ref-with-doc-id-1",
|
||||||
"label": "Doc 1 ref",
|
"label": "Doc 1 ref",
|
||||||
"type": "link",
|
"type": "link",
|
||||||
|
@ -219,8 +219,8 @@ describe('toSidebarsProp', () => {
|
||||||
"className": undefined,
|
"className": undefined,
|
||||||
"customProps": undefined,
|
"customProps": undefined,
|
||||||
"docId": "doc-id-1",
|
"docId": "doc-id-1",
|
||||||
"href": undefined,
|
"href": "/doc-1",
|
||||||
"label": "Doc 1 ref bis",
|
"label": "Doc 1 title",
|
||||||
"type": "link",
|
"type": "link",
|
||||||
"unlisted": undefined,
|
"unlisted": undefined,
|
||||||
},
|
},
|
||||||
|
@ -232,7 +232,7 @@ describe('toSidebarsProp', () => {
|
||||||
"className": undefined,
|
"className": undefined,
|
||||||
"customProps": undefined,
|
"customProps": undefined,
|
||||||
"docId": "doc-id-1",
|
"docId": "doc-id-1",
|
||||||
"href": undefined,
|
"href": "/doc-1",
|
||||||
"key": "doc-id-1",
|
"key": "doc-id-1",
|
||||||
"label": "Doc 1",
|
"label": "Doc 1",
|
||||||
"type": "link",
|
"type": "link",
|
||||||
|
@ -242,8 +242,8 @@ describe('toSidebarsProp', () => {
|
||||||
"className": undefined,
|
"className": undefined,
|
||||||
"customProps": undefined,
|
"customProps": undefined,
|
||||||
"docId": "doc-id-1",
|
"docId": "doc-id-1",
|
||||||
"href": undefined,
|
"href": "/doc-1",
|
||||||
"label": "Doc 1 bis",
|
"label": "Doc 1 title",
|
||||||
"type": "link",
|
"type": "link",
|
||||||
"unlisted": undefined,
|
"unlisted": undefined,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue