Update tests

This commit is contained in:
alxshelepenok 2018-11-11 14:51:07 +03:00
parent cca1567f16
commit 55e877a81b
15 changed files with 30 additions and 22 deletions

View File

@ -12,7 +12,7 @@ describe('Feed', () => {
categorySlug: '/test_0' categorySlug: '/test_0'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_0', description: 'test_0',
category: 'test_0', category: 'test_0',
title: 'test_0' title: 'test_0'
@ -26,7 +26,7 @@ describe('Feed', () => {
categorySlug: '/test_1' categorySlug: '/test_1'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_1', description: 'test_1',
category: 'test_1', category: 'test_1',
title: 'test_1' title: 'test_1'

View File

@ -12,7 +12,7 @@ exports[`Feed renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>
@ -60,7 +60,7 @@ exports[`Feed renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>

View File

@ -9,6 +9,7 @@ exports[`Pagination renders correctly 1`] = `
> >
<Link <Link
className="pagination__prev-link" className="pagination__prev-link"
rel="prev"
to="/page/1" to="/page/1"
> >
← PREV ← PREV
@ -19,6 +20,7 @@ exports[`Pagination renders correctly 1`] = `
> >
<Link <Link
className="pagination__next-link" className="pagination__next-link"
rel="next"
to="/page/3" to="/page/3"
> >
→ NEXT → NEXT

View File

@ -5,7 +5,7 @@ import Meta from './Meta';
describe('Meta', () => { describe('Meta', () => {
it('renders correctly', () => { it('renders correctly', () => {
const props = { const props = {
date: '2016-09-01T23:46:37.121Z' date: '2016-09-01'
}; };
const tree = renderer.create(<Meta {...props} />).toJSON(); const tree = renderer.create(<Meta {...props} />).toJSON();

View File

@ -8,7 +8,7 @@ exports[`Meta renders correctly 1`] = `
className="meta__date" className="meta__date"
> >
Published Published
2 Sep 2016 1 Sep 2016
</p> </p>
</div> </div>
`; `;

View File

@ -13,7 +13,7 @@ describe('Post', () => {
] ]
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
tags: [ tags: [
'test_0', 'test_0',
'test_1' 'test_1'

View File

@ -41,7 +41,7 @@ exports[`Post renders correctly 1`] = `
className="meta__date" className="meta__date"
> >
Published Published
2 Sep 2016 1 Sep 2016
</p> </p>
</div> </div>
<div <div

View File

@ -32,7 +32,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>
@ -80,7 +80,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>
@ -129,6 +129,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
> >
<Link <Link
className="pagination__prev-link" className="pagination__prev-link"
rel="prev"
to="/page/1" to="/page/1"
> >
← PREV ← PREV
@ -139,6 +140,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
> >
<Link <Link
className="pagination__next-link" className="pagination__next-link"
rel="next"
to="/page/3" to="/page/3"
> >
→ NEXT → NEXT

View File

@ -27,7 +27,7 @@ exports[`IndexTemplate renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>
@ -75,7 +75,7 @@ exports[`IndexTemplate renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>
@ -124,6 +124,7 @@ exports[`IndexTemplate renders correctly 1`] = `
> >
<Link <Link
className="pagination__prev-link" className="pagination__prev-link"
rel="prev"
to="/page/1" to="/page/1"
> >
← PREV ← PREV
@ -134,6 +135,7 @@ exports[`IndexTemplate renders correctly 1`] = `
> >
<Link <Link
className="pagination__next-link" className="pagination__next-link"
rel="next"
to="/page/3" to="/page/3"
> >
→ NEXT → NEXT

View File

@ -44,7 +44,7 @@ exports[`PostTemplate renders correctly 1`] = `
className="meta__date" className="meta__date"
> >
Published Published
2 Sep 2016 1 Sep 2016
</p> </p>
</div> </div>
<div <div

View File

@ -32,7 +32,7 @@ exports[`TagTemplate renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>
@ -80,7 +80,7 @@ exports[`TagTemplate renders correctly 1`] = `
> >
<time <time
className="feed__item-meta-time" className="feed__item-meta-time"
dateTime="September 2, 2016" dateTime="September 1, 2016"
> >
September 2016 September 2016
</time> </time>
@ -129,6 +129,7 @@ exports[`TagTemplate renders correctly 1`] = `
> >
<Link <Link
className="pagination__prev-link" className="pagination__prev-link"
rel="prev"
to="/page/1" to="/page/1"
> >
← PREV ← PREV
@ -139,6 +140,7 @@ exports[`TagTemplate renders correctly 1`] = `
> >
<Link <Link
className="pagination__next-link" className="pagination__next-link"
rel="next"
to="/page/3" to="/page/3"
> >
→ NEXT → NEXT

View File

@ -24,7 +24,7 @@ describe('CategoryTemplate', () => {
categorySlug: '/test' categorySlug: '/test'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_0', description: 'test_0',
category: 'test', category: 'test',
title: 'test_0' title: 'test_0'
@ -38,7 +38,7 @@ describe('CategoryTemplate', () => {
categorySlug: '/test' categorySlug: '/test'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_1', description: 'test_1',
category: 'test', category: 'test',
title: 'test_1' title: 'test_1'

View File

@ -14,7 +14,7 @@ describe('IndexTemplate', () => {
categorySlug: '/test_0' categorySlug: '/test_0'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_0', description: 'test_0',
category: 'test_0', category: 'test_0',
title: 'test_0' title: 'test_0'
@ -28,7 +28,7 @@ describe('IndexTemplate', () => {
categorySlug: '/test_1' categorySlug: '/test_1'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_1', description: 'test_1',
category: 'test_1', category: 'test_1',
title: 'test_1' title: 'test_1'

View File

@ -20,7 +20,7 @@ describe('PostTemplate', () => {
] ]
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test', description: 'test',
title: 'test', title: 'test',
tags: [ tags: [

View File

@ -24,7 +24,7 @@ describe('TagTemplate', () => {
categorySlug: '/test' categorySlug: '/test'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_0', description: 'test_0',
category: 'test', category: 'test',
title: 'test_0' title: 'test_0'
@ -38,7 +38,7 @@ describe('TagTemplate', () => {
categorySlug: '/test' categorySlug: '/test'
}, },
frontmatter: { frontmatter: {
date: '2016-09-01T23:46:37.121Z', date: '2016-09-01',
description: 'test_1', description: 'test_1',
category: 'test', category: 'test',
title: 'test_1' title: 'test_1'