mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 02:08:55 +02:00
test(v2): add unit test for migration of config file (#3323)
This commit is contained in:
parent
d299b99631
commit
a72ac91e3e
3 changed files with 185 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import importFresh from 'import-fresh';
|
||||
import {createConfigFile} from '../index';
|
||||
|
||||
describe('create config', () => {
|
||||
test('simple test', () => {
|
||||
const input = importFresh(`${__dirname}/__fixtures__/sourceSiteConfig.js`);
|
||||
|
||||
const result = createConfigFile(input);
|
||||
|
||||
const output = importFresh(
|
||||
`${__dirname}/__fixtures__/expectedSiteConfig.js`,
|
||||
);
|
||||
expect(result).toEqual(output);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue