feat: add blog loader

This commit is contained in:
endiliey 2018-07-28 18:04:56 +08:00
parent 94c45e36cb
commit d2e12a8e61
13 changed files with 633 additions and 25 deletions

View file

@ -7,22 +7,10 @@ describe('loadConfig', () => {
const customDir = path.join(__dirname, '__fixtures__', 'custom');
test('simple', () => {
expect(loadConfig(simpleDir)).toMatchInlineSnapshot(`
Object {
"description": "Hello World",
"title": "Hello World",
}
`);
expect(loadConfig(simpleDir)).toMatchSnapshot();
});
test('custom', () => {
expect(loadConfig(customDir)).toMatchInlineSnapshot(`
Object {
"base": "blogi",
"description": "Hello World",
"dest": "blogi",
"title": "Hello World",
}
`);
expect(loadConfig(customDir)).toMatchSnapshot();
});
});