chore: eslint & prettier nits

This commit is contained in:
endiliey 2018-08-11 01:33:24 +08:00
parent 8f493605ad
commit 084063eabe
15 changed files with 152 additions and 142 deletions

View file

@ -1,17 +1,17 @@
import loadPages from '@lib/load/pages.js';
import path from 'path';
describe('loadPages', () => {
test('valid pages', async () => {
const pagesDir = path.join(__dirname, '__fixtures__', 'simple-pages');
const pagesData = await loadPages(pagesDir);
expect(pagesData).toMatchSnapshot();
expect(pagesData).not.toBeNull();
});
test('invalid pages', async () => {
const nonExistingDir = path.join(__dirname, '__fixtures__', 'nonExisting');
const pagesData = await loadPages(nonExistingDir);
expect(pagesData).toEqual([]);
});
});
import loadPages from '@lib/load/pages';
import path from 'path';
describe('loadPages', () => {
test('valid pages', async () => {
const pagesDir = path.join(__dirname, '__fixtures__', 'simple-pages');
const pagesData = await loadPages(pagesDir);
expect(pagesData).toMatchSnapshot();
expect(pagesData).not.toBeNull();
});
test('invalid pages', async () => {
const nonExistingDir = path.join(__dirname, '__fixtures__', 'nonExisting');
const pagesData = await loadPages(nonExistingDir);
expect(pagesData).toEqual([]);
});
});