test: add easy setup for test cases

This commit is contained in:
endiliey 2018-09-07 18:00:50 +08:00
parent b477863a30
commit 31d333b82f
69 changed files with 3387 additions and 24 deletions

View file

@ -3,11 +3,7 @@ import path from 'path';
describe('loadPages', () => {
test('valid pages', async () => {
const pagesDir = path.join(
__dirname,
'__fixtures__',
'simple-pages'
);
const pagesDir = path.join(__dirname, '__fixtures__', 'simple-pages');
const pagesData = await loadPages(pagesDir);
expect(pagesData).toMatchSnapshot();
expect(pagesData).not.toBeNull();