mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-21 13:06:58 +02:00
refactor(v2): add typing for pages plugin (#1813)
* refactor(v2): add typing for pages plugin * misc: new lines
This commit is contained in:
parent
95f0552bad
commit
c4cc7f881b
13 changed files with 70 additions and 22 deletions
packages/docusaurus-plugin-content-docs-legacy/src/__tests__
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import pluginContentDocs from '../index';
|
||||
import {LoadContext} from '@docusaurus/types';
|
||||
|
||||
|
@ -24,7 +25,7 @@ describe('loadDocs', () => {
|
|||
const sidebarPath = path.join(siteDir, 'sidebars.json');
|
||||
const pluginPath = 'docs';
|
||||
const plugin = pluginContentDocs(context, {
|
||||
path: 'docs',
|
||||
path: pluginPath,
|
||||
sidebarPath,
|
||||
});
|
||||
const {docs: docsMetadata} = await plugin.loadContent();
|
||||
|
@ -38,7 +39,7 @@ describe('loadDocs', () => {
|
|||
sidebar: 'docs',
|
||||
source: path.join('@site', pluginPath, 'hello.md'),
|
||||
title: 'Hello, World !',
|
||||
description: `Hi, Endilie here :)`,
|
||||
description: 'Hi, Endilie here :)',
|
||||
});
|
||||
|
||||
expect(docsMetadata['foo/bar']).toEqual({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue