mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-18 18:52:23 +02:00
chore: enable eslint-plugin-jest (#6375)
This commit is contained in:
parent
3e5944ef1f
commit
52db7320a6
32 changed files with 194 additions and 193 deletions
|
@ -9,7 +9,7 @@ import path from 'path';
|
|||
import {loadContext} from '@docusaurus/core/lib/server';
|
||||
|
||||
import pluginContentPages from '../index';
|
||||
import normalizePluginOptions from './pluginOptionSchema.test';
|
||||
import {PluginOptionSchema} from '../pluginOptionSchema';
|
||||
|
||||
describe('docusaurus-plugin-content-pages', () => {
|
||||
test('simple pages', async () => {
|
||||
|
@ -18,9 +18,9 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
const pluginPath = 'src/pages';
|
||||
const plugin = await pluginContentPages(
|
||||
context,
|
||||
normalizePluginOptions({
|
||||
PluginOptionSchema.validate({
|
||||
path: pluginPath,
|
||||
}),
|
||||
}).value,
|
||||
);
|
||||
const pagesMetadata = await plugin.loadContent?.();
|
||||
|
||||
|
@ -85,9 +85,9 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
currentLocale: 'fr',
|
||||
},
|
||||
},
|
||||
normalizePluginOptions({
|
||||
PluginOptionSchema.validate({
|
||||
path: pluginPath,
|
||||
}),
|
||||
}).value,
|
||||
);
|
||||
const pagesMetadata = await plugin.loadContent?.();
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import {PluginOptionSchema, DEFAULT_OPTIONS} from '../pluginOptionSchema';
|
||||
import type {PluginOptions} from '@docusaurus/plugin-content-pages';
|
||||
|
||||
export default function normalizePluginOptions(
|
||||
function normalizePluginOptions(
|
||||
options: Partial<PluginOptions>,
|
||||
): PluginOptions {
|
||||
const {value, error} = PluginOptionSchema.validate(options, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue