refactor: move test utils into test folder (#6777)

This commit is contained in:
Joshua Chen 2022-02-27 19:05:44 +08:00 committed by GitHub
parent 95ab08285b
commit 3e5da386ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -6,12 +6,12 @@
*/
import path from 'path';
import {load} from './index';
import {load} from '../index';
import type {Props} from '@docusaurus/types';
// Helper methods to setup dummy/fake projects.
export default async function loadSetup(name: string): Promise<Props> {
const fixtures = path.join(__dirname, '__tests__', '__fixtures__');
const fixtures = path.join(__dirname, '__fixtures__');
const simpleSite = path.join(fixtures, 'simple-site');
const customSite = path.join(fixtures, 'custom-site');

View File

@ -8,7 +8,7 @@
import {validate} from 'webpack';
import createClientConfig from '../client';
import loadSetup from '../../server/loadSetup';
import loadSetup from '../../server/__tests__/testUtils';
describe('webpack dev config', () => {
test('simple', async () => {

View File

@ -8,7 +8,7 @@
import {validate} from 'webpack';
import createServerConfig from '../server';
import loadSetup from '../../server/loadSetup';
import loadSetup from '../../server/__tests__/testUtils';
describe('webpack production config', () => {
test('simple', async () => {