Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Jan 23, 2020
1 parent 9d5ce24 commit cf254b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('loadBlog', () => {
permalink: noDatePermalink,
title: 'no date',
},
truncated: false,
});
expect(
blogPosts.find(v => v.metadata.title === 'Happy 1st Birthday Slash!')
Expand All @@ -76,6 +77,7 @@ describe('loadBlog', () => {
permalink: '/blog/2019/01/01/date-matter',
title: 'date-matter',
},
truncated: false,
});

expect(
Expand All @@ -91,6 +93,7 @@ describe('loadBlog', () => {
permalink: '/blog/2019/01/01/date-matter',
title: 'date-matter',
},
truncated: false,
});
});
});
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-content-blog/src/blogUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export async function generateBlogPosts(
date,
tags: frontMatter.tags,
title: frontMatter.title,
truncated: truncateMarker.test(content),
truncated: truncateMarker?.test(content) || false,
},
});
}),
Expand Down

0 comments on commit cf254b0

Please sign in to comment.