mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 12:47:14 +02:00
28 lines
675 B
JavaScript
28 lines
675 B
JavaScript
const path = require('path');
|
|
const fs = require('fs');
|
|
const loadConfig = require('../../lib/loader/config');
|
|
|
|
describe('loadConfig', () => {
|
|
const simpleDir = path.join(__dirname, '__fixtures__', 'simple');
|
|
const customDir = path.join(__dirname, '__fixtures__', 'custom');
|
|
|
|
test('simple', () => {
|
|
expect(loadConfig(simpleDir)).toMatchInlineSnapshot(`
|
|
Object {
|
|
"description": "Hello World",
|
|
"title": "Hello World",
|
|
}
|
|
`);
|
|
});
|
|
|
|
test('custom', () => {
|
|
expect(loadConfig(customDir)).toMatchInlineSnapshot(`
|
|
Object {
|
|
"base": "blogi",
|
|
"description": "Hello World",
|
|
"dest": "blogi",
|
|
"title": "Hello World",
|
|
}
|
|
`);
|
|
});
|
|
});
|