mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
* chore(v2): add flow setup * nits * fix * add flow-typed * ignore compiled library * fix error * fix typing * fix module name mapper * setup for @docusaurus/core * dont try remove type without @flow * fix can't find @docusaurus/utils * fix test * remove obscure relative paths * more refactoring * add typing for server/load/theme.js * no need to ship .flow source
29 lines
826 B
JavaScript
29 lines
826 B
JavaScript
/**
|
|
* 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 {validate} from 'webpack';
|
|
|
|
import createServerConfig from '../server';
|
|
import loadSetup from '../../server/load/loadSetup';
|
|
|
|
describe('webpack production config', () => {
|
|
test('simple', async () => {
|
|
console.log = jest.fn();
|
|
const props = await loadSetup('simple');
|
|
const config = createServerConfig(props);
|
|
const errors = validate(config);
|
|
expect(errors.length).toBe(0);
|
|
});
|
|
|
|
test('custom', async () => {
|
|
console.log = jest.fn();
|
|
const props = await loadSetup('custom');
|
|
const config = createServerConfig(props);
|
|
const errors = validate(config);
|
|
expect(errors.length).toBe(0);
|
|
});
|
|
});
|