mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-21 10:37:51 +02:00
test: add easy setup for test cases
This commit is contained in:
parent
b477863a30
commit
31d333b82f
69 changed files with 3387 additions and 24 deletions
|
@ -3,14 +3,24 @@ import load from '@lib/load';
|
|||
|
||||
// Helper methods to setup dummy/ fake projects
|
||||
const loadSetup = async name => {
|
||||
const simpleWebsite = path.join(__dirname, '__fixtures__', 'simple-website');
|
||||
const customWebsite = path.join(__dirname, '__fixtures__', 'custom-website');
|
||||
const fixtures = path.join(__dirname, '__fixtures__');
|
||||
const simpleSite = path.join(fixtures, 'simple-site');
|
||||
const customSite = path.join(fixtures, 'custom-site');
|
||||
const versionedSite = path.join(fixtures, 'versioned-site');
|
||||
const translatedSite = path.join(fixtures, 'translated-site');
|
||||
const transversionedSite = path.join(fixtures, 'transversioned-site');
|
||||
|
||||
switch (name) {
|
||||
case 'simple':
|
||||
return load(simpleWebsite);
|
||||
return load(simpleSite);
|
||||
case 'custom':
|
||||
return load(customWebsite);
|
||||
return load(customSite);
|
||||
case 'versioned':
|
||||
return load(versionedSite);
|
||||
case 'transversioned':
|
||||
return load(transversionedSite);
|
||||
case 'translated':
|
||||
return load(translatedSite);
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue