mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-03 04:07:32 +02:00
32 lines
1.2 KiB
JavaScript
32 lines
1.2 KiB
JavaScript
import loadDocs from '@lib/load/docs';
|
|
import loadSetup from '../../loadSetup';
|
|
|
|
describe('loadDocs', () => {
|
|
test('simple website', async () => {
|
|
const props = await loadSetup('simple');
|
|
const {siteDir, docsDir, env, siteConfig} = props;
|
|
const {docsMetadatas} = await loadDocs({siteDir, docsDir, env, siteConfig});
|
|
expect(docsMetadatas).toMatchSnapshot();
|
|
});
|
|
|
|
test('versioned website', async () => {
|
|
const props = await loadSetup('versioned');
|
|
const {siteDir, docsDir, env, siteConfig} = props;
|
|
const {docsMetadatas} = await loadDocs({siteDir, docsDir, env, siteConfig});
|
|
expect(docsMetadatas).toMatchSnapshot();
|
|
});
|
|
|
|
test('versioned & translated website', async () => {
|
|
const props = await loadSetup('transversioned');
|
|
const {siteDir, docsDir, env, siteConfig} = props;
|
|
const {docsMetadatas} = await loadDocs({siteDir, docsDir, env, siteConfig});
|
|
expect(docsMetadatas).toMatchSnapshot();
|
|
});
|
|
|
|
test('translated website', async () => {
|
|
const props = await loadSetup('translated');
|
|
const {siteDir, docsDir, env, siteConfig} = props;
|
|
const {docsMetadatas} = await loadDocs({siteDir, docsDir, env, siteConfig});
|
|
expect(docsMetadatas).toMatchSnapshot();
|
|
});
|
|
});
|