mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 12:07:00 +02:00
v2: prepare to move
This commit is contained in:
parent
dc7ef96849
commit
45736200b0
172 changed files with 0 additions and 0 deletions
32
v2/test/load/docs/index.test.js
Normal file
32
v2/test/load/docs/index.test.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
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();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue