mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 20:46:58 +02:00
test: fix inconsistent test
This commit is contained in:
parent
0f38ae3979
commit
0cef519e7f
3 changed files with 389 additions and 569 deletions
|
@ -1,23 +1,32 @@
|
|||
import loadDocs from '@lib/load/docs';
|
||||
import loadSetup from '../../loadSetup';
|
||||
|
||||
describe('loadDocs', () => {
|
||||
test('simple website', async () => {
|
||||
const props = await loadSetup('simple');
|
||||
expect(props).toMatchSnapshot();
|
||||
const {siteDir, docsDir, env} = props;
|
||||
const docsData = await loadDocs({siteDir, docsDir, env});
|
||||
expect(docsData).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('versioned website', async () => {
|
||||
const props = await loadSetup('versioned');
|
||||
expect(props).toMatchSnapshot();
|
||||
const {siteDir, docsDir, env} = props;
|
||||
const docsData = await loadDocs({siteDir, docsDir, env});
|
||||
expect(docsData).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('versioned & translated website', async () => {
|
||||
const props = await loadSetup('transversioned');
|
||||
expect(props).toMatchSnapshot();
|
||||
const {siteDir, docsDir, env} = props;
|
||||
const docsData = await loadDocs({siteDir, docsDir, env});
|
||||
expect(docsData).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('translated website', async () => {
|
||||
const props = await loadSetup('translated');
|
||||
expect(props).toMatchSnapshot();
|
||||
const {siteDir, docsDir, env} = props;
|
||||
const docsData = await loadDocs({siteDir, docsDir, env});
|
||||
expect(docsData).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue