Skip to content

Commit

Permalink
test(v2): fix testcase error
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Mar 5, 2021
1 parent 72005aa commit 3297c3a
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,23 @@ describe('loadBlog', () => {
test('simple website blog dates localized', async () => {
const siteDir = path.join(__dirname, '__fixtures__', 'website');
const blogPostsFrench = await getBlogPosts(siteDir, {}, getI18n('fr'));
expect(blogPostsFrench).toHaveLength(5);
expect(blogPostsFrench).toHaveLength(6);
expect(blogPostsFrench[0].metadata.formattedDate).toMatchInlineSnapshot(
`"16 août 2020"`,
`"5 mars 2021"`,
);
expect(blogPostsFrench[1].metadata.formattedDate).toMatchInlineSnapshot(
`"15 août 2020"`,
`"16 août 2020"`,
);
expect(blogPostsFrench[2].metadata.formattedDate).toMatchInlineSnapshot(
`"27 février 2020"`,
`"15 août 2020"`,
);
expect(blogPostsFrench[3].metadata.formattedDate).toMatchInlineSnapshot(
`"1 janvier 2019"`,
`"27 février 2020"`,
);
expect(blogPostsFrench[4].metadata.formattedDate).toMatchInlineSnapshot(
`"1 janvier 2019"`,
);
expect(blogPostsFrench[5].metadata.formattedDate).toMatchInlineSnapshot(
`"14 décembre 2018"`,
);
});
Expand Down Expand Up @@ -225,8 +228,8 @@ describe('loadBlog', () => {
});
expect(editUrlFunction).toHaveBeenCalledWith({
blogDirPath: 'blog',
blogPath: 'long-text-r.md',
permalink: '/blog/long-text-r',
blogPath: 'full-r.mdx',
permalink: '/blog/full-r',
locale: 'en',
});
expect(editUrlFunction).toHaveBeenCalledWith({
Expand Down

0 comments on commit 3297c3a

Please sign in to comment.