chore: revert delete loadSetup.ts

This commit is contained in:
endiliey 2019-11-26 16:54:10 +07:00
parent 2856b328a5
commit 1aff2087b4

View file

@ -0,0 +1,25 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import path from 'path';
import {load} from './index';
import {Props} from '@docusaurus/types';
// Helper methods to setup dummy/fake projects
export const loadSetup = async (name: string): Promise<Props> => {
const fixtures = path.join(__dirname, '__tests__', '__fixtures__');
const simpleSite = path.join(fixtures, 'simple-site');
const customSite = path.join(fixtures, 'custom-site');
switch (name) {
case 'custom':
return load(customSite);
case 'simple':
default:
return load(simpleSite);
}
};