comma dangle
This commit is contained in:
+13
-13
@@ -15,8 +15,8 @@ const config = {
|
||||
'draft': 'draft.md',
|
||||
'default_title': 'Untitled',
|
||||
'default_thumbnail': 'default.png',
|
||||
'thumbnail_tag': 'thumbnail'
|
||||
}
|
||||
'thumbnail_tag': 'thumbnail',
|
||||
},
|
||||
};
|
||||
|
||||
const fw = require('../src/file_walker')(config);
|
||||
@@ -46,7 +46,7 @@ describe('Test function fileTree', () => {
|
||||
utils.createEmptyDirs([
|
||||
path.join(dataDir, 'test', 'test'),
|
||||
path.join(dataDir, 'test', 'test2'),
|
||||
path.join(dataDir, 'test2')
|
||||
path.join(dataDir, 'test2'),
|
||||
]);
|
||||
fw.fileTree(dataDir, (err, list) => {
|
||||
expect(err).toBeNull();
|
||||
@@ -58,7 +58,7 @@ describe('Test function fileTree', () => {
|
||||
test('simple files', (done) => {
|
||||
const fileList = [
|
||||
path.join(dataDir, 'f1.txt'),
|
||||
path.join(dataDir, 'f2.txt')
|
||||
path.join(dataDir, 'f2.txt'),
|
||||
];
|
||||
utils.createEmptyFiles(fileList);
|
||||
fw.fileTree(dataDir, (err, list) => {
|
||||
@@ -72,13 +72,13 @@ describe('Test function fileTree', () => {
|
||||
test('nested files', (done) => {
|
||||
utils.createEmptyDirs([
|
||||
path.join(dataDir, 'test', 'test'),
|
||||
path.join(dataDir, 'test2')
|
||||
path.join(dataDir, 'test2'),
|
||||
]);
|
||||
const fileList = [
|
||||
path.join(dataDir, 'f1.txt'),
|
||||
path.join(dataDir, 'test', 'f2.txt'),
|
||||
path.join(dataDir, 'test', 'test', 'f3.txt'),
|
||||
path.join(dataDir, 'test2', 'f4.txt')
|
||||
path.join(dataDir, 'test2', 'f4.txt'),
|
||||
];
|
||||
utils.createEmptyFiles(fileList);
|
||||
fw.fileTree(dataDir, (err, list) => {
|
||||
@@ -120,7 +120,7 @@ describe('Test index article reading', () => {
|
||||
expect(err).toBeNull();
|
||||
expect(info).toEqual({
|
||||
title: 'This is an awesome title !?¤',
|
||||
thumbnail: './thumbnail.jpg'
|
||||
thumbnail: './thumbnail.jpg',
|
||||
});
|
||||
done();
|
||||
});
|
||||
@@ -136,7 +136,7 @@ describe('Test index article reading', () => {
|
||||
expect(err).toBeNull();
|
||||
expect(info).toEqual({
|
||||
title: undefined,
|
||||
thumbnail: './thumbnail.jpg'
|
||||
thumbnail: './thumbnail.jpg',
|
||||
});
|
||||
done();
|
||||
});
|
||||
@@ -148,7 +148,7 @@ describe('Test index article reading', () => {
|
||||
expect(err).toBeNull();
|
||||
expect(info).toEqual({
|
||||
title: 'title',
|
||||
thumbnail: undefined
|
||||
thumbnail: undefined,
|
||||
});
|
||||
done();
|
||||
});
|
||||
@@ -164,7 +164,7 @@ describe('Test index article reading', () => {
|
||||
expect(err).toBeNull();
|
||||
expect(info).toEqual({
|
||||
title: 'This is an awesome title !?¤',
|
||||
thumbnail: undefined
|
||||
thumbnail: undefined,
|
||||
});
|
||||
done();
|
||||
});
|
||||
@@ -181,7 +181,7 @@ describe('Test index article reading', () => {
|
||||
expect(err).toBeNull();
|
||||
expect(info).toEqual({
|
||||
title: 'This is an awesome title !?¤',
|
||||
thumbnail: './thumbnail.jpg'
|
||||
thumbnail: './thumbnail.jpg',
|
||||
});
|
||||
done();
|
||||
});
|
||||
@@ -208,12 +208,12 @@ describe('Test article fetching', () => {
|
||||
test('misplaced index file', (done) => {
|
||||
utils.createEmptyDirs([
|
||||
path.join(dataDir, 'test', 'test'),
|
||||
path.join(dataDir, '2019', '05', '05')
|
||||
path.join(dataDir, '2019', '05', '05'),
|
||||
]);
|
||||
utils.createEmptyFiles([
|
||||
path.join(dataDir, testIndex),
|
||||
path.join(dataDir, 'test', 'test', testIndex),
|
||||
path.join(dataDir, '2019', '05', testIndex)
|
||||
path.join(dataDir, '2019', '05', testIndex),
|
||||
]);
|
||||
fw.fetchArticles((err, dict) => {
|
||||
expect(err).toBeNull();
|
||||
|
||||
Reference in New Issue
Block a user